From 6fbcfcad7bc59155b6fb55e2f0932a8f418d9853 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 20 Jun 2018 14:42:21 -0400 Subject: [PATCH] set exit code instead of exiting --- jslib | 2 +- src/program.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jslib b/jslib index e5db01083c..d75543e6c8 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit e5db01083cc13df3696bb30562a83d729280ac03 +Subproject commit d75543e6c88b220d8e3c7d66fb768d39f9480587 diff --git a/src/program.ts b/src/program.ts index 6ac5704566..8a8fe9d452 100644 --- a/src/program.ts +++ b/src/program.ts @@ -70,7 +70,7 @@ export class Program { program.on('command:*', () => { writeLn(chalk.redBright('Invalid command: ' + program.args.join(' '))); writeLn('See --help for a list of available commands.', true); - process.exit(1); + process.exitCode = 1; }); program.on('--help', () => { @@ -502,7 +502,7 @@ export class Program { writeLn(chalk.redBright(response.message), true); } } - process.exit(1); + process.exitCode = 1; return; } @@ -529,7 +529,7 @@ export class Program { writeLn(out, true); } } - process.exit(); + process.exitCode = 0; } private getJson(obj: any): string {