From 2418e200edfe2350e808a578a6d65db412e61502 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 20 Jun 2018 14:41:00 -0400 Subject: [PATCH] Revert "Remove calls to process.exit() which forces async calls to exit early (#15)" This reverts commit 87be2e86faf4f4824cf2d6764f0b5a0f1ddf3434. --- jslib | 2 +- src/program.ts | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/jslib b/jslib index c3ad9b9b7d..e5db01083c 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit c3ad9b9b7df2c70ea9a80627c3c4e263886eaf8b +Subproject commit e5db01083cc13df3696bb30562a83d729280ac03 diff --git a/src/program.ts b/src/program.ts index 2d1cd03870..6ac5704566 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.exitCode = 1; + process.exit(1); }); program.on('--help', () => { @@ -502,7 +502,7 @@ export class Program { writeLn(chalk.redBright(response.message), true); } } - process.exitCode = 1; + process.exit(1); return; } @@ -529,8 +529,7 @@ export class Program { writeLn(out, true); } } - process.exitCode = 0; - + process.exit(); } private getJson(obj: any): string {