Revert "Remove calls to process.exit() which forces async calls to exit early (#15)"

This reverts commit 87be2e86fa.
This commit is contained in:
Kyle Spearrin 2018-06-20 14:41:00 -04:00
parent 87be2e86fa
commit 2418e200ed
2 changed files with 4 additions and 5 deletions

2
jslib

@ -1 +1 @@
Subproject commit c3ad9b9b7df2c70ea9a80627c3c4e263886eaf8b
Subproject commit e5db01083cc13df3696bb30562a83d729280ac03

View File

@ -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 {