Skip to content

Commit

Permalink
Merge pull request #334 from Tofandel/patch-3
Browse files Browse the repository at this point in the history
fix(exit code): the process doesn't exit with the correct exit code
  • Loading branch information
srowhani authored Aug 27, 2020
2 parents 43628fc + 85318fe commit 9f47d89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ const { version } = require('../package.json');
SentryService.reportIncident(error);
}
logger.error(error);
process.exitCode = 1;
});

process.on('uncaughtException', (error: Error) => {
if (!baseOptions.options.optOut) {
SentryService.reportIncident(error);
}
logger.error(error);
process.exit(1);
process.exitCode = 1;
});

const pattern = program.args[0];
Expand Down

0 comments on commit 9f47d89

Please sign in to comment.