Skip to content

Commit

Permalink
Fix compatibility with being run in a child process (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmgImAlexis committed Feb 12, 2020
1 parent d7fa875 commit 08af7c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli-main.js
Expand Up @@ -132,7 +132,7 @@ if (typeof options.space === 'string') {
const log = report => {
const reporter = options.reporter ? xo.getFormatter(options.reporter) : formatterPretty;
process.stdout.write(reporter(report.results));
process.exit(report.errorCount === 0 ? 0 : 1);
process.exitCode = report.errorCount === 0 ? 0 : 1;
};

// `xo -` => `xo --stdin`
Expand Down

0 comments on commit 08af7c1

Please sign in to comment.