Skip to content

Commit

Permalink
feat(core): exit code 1 when error in initial run
Browse files Browse the repository at this point in the history
Exit the process with exitCode 1 when an error of any kind occurred.

BREAKING CHANGE: Stryker now exists with exitCode `1` if an error of any kind occurs.
  • Loading branch information
nicojs committed Feb 14, 2020
1 parent b45e872 commit 49c5162
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/Stryker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default class Stryker {
const mutationTestExecutor = mutationTestProcessInjector.injectClass(MutationTestExecutor);
const mutantResults = await mutationTestExecutor.run(testableMutants);
await this.reportResult(mutantResults, inputFileInjector);
await this.logDone();
this.logDone();
return mutantResults;
} else {
this.logTraceLogLevelHint();
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/StrykerCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ export default class StrykerCli {
this.log.info('Trouble figuring out what went wrong? Try `npx stryker run --fileLogLevel trace --logLevel debug` to get some more info.');
}
process.exitCode = 1;
process.kill(process.pid, 'SIGINT');
});
} else {
this.log.error('Unknown command: "%s", supported commands: [%s], or use `stryker --help`.', this.command, Object.keys(commands));
Expand Down

0 comments on commit 49c5162

Please sign in to comment.