From 08af7c13de9c62e74023780405f4f062944209e1 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Thu, 13 Feb 2020 09:06:30 +1030 Subject: [PATCH] Fix compatibility with being run in a child process (#405) --- cli-main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli-main.js b/cli-main.js index 5c1a18fc..04467880 100755 --- a/cli-main.js +++ b/cli-main.js @@ -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`