Skip to content

Commit

Permalink
chore: throw errors when the result fails
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Mar 5, 2021
1 parent bfefe98 commit ef61f93
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ async function testLint(packedPkg, testRepo, isWorkspace = false, isSilent = fal
throw e
}

await execa.command("eslint .", { cwd: distFolder, stdout: !isSilent ? "inherit" : "pipe" })
const result = await execa.command("eslint .", { cwd: distFolder, stdout: !isSilent ? "inherit" : "pipe" })
if (result.failed) {
throw new Error("An error happened")
}
}

/** main entry */
Expand Down

0 comments on commit ef61f93

Please sign in to comment.