Use process.exitCode instead of process.exit in compilerCallback

This commit is contained in:
Wèi Cōngruì 2017-12-26 13:53:17 +08:00
parent 8988dc8fed
commit 3823eae5b0
1 changed files with 2 additions and 1 deletions

View File

@ -364,7 +364,8 @@ yargs.parse(process.argv.slice(2), (err, argv, output) => {
lastHash = null;
console.error(err.stack || err);
if(err.details) console.error(err.details);
process.exit(1); // eslint-disable-line
process.exitCode = 1;
return;
}
if(outputOptions.json) {
process.stdout.write(JSON.stringify(stats.toJson(outputOptions), null, 2) + "\n");