From 8b6943a7ca3f6c1f34550c800485564ba657a5f1 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Mon, 7 Oct 2019 13:58:11 +1030 Subject: [PATCH] Fix compatibility with bring run in child_process and outputting a large stdout. --- 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`