1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

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

* Update invocations of inquirer.js prompts to output prompt to stderr.

fixes #7

* Updates to use updated typings from @types/inquirer

* Removes extraneous async / await from writeLn
This commit is contained in:
Keith Kelly
2018-06-20 14:37:03 -04:00
committed by Kyle Spearrin
parent 04b63d16ee
commit 87be2e86fa
2 changed files with 5 additions and 4 deletions

2
jslib

Submodule jslib updated: e5db01083c...c3ad9b9b7d

View File

@@ -70,7 +70,7 @@ export class Program {
program.on('command:*', () => { program.on('command:*', () => {
writeLn(chalk.redBright('Invalid command: ' + program.args.join(' '))); writeLn(chalk.redBright('Invalid command: ' + program.args.join(' ')));
writeLn('See --help for a list of available commands.', true); writeLn('See --help for a list of available commands.', true);
process.exit(1); process.exitCode = 1;
}); });
program.on('--help', () => { program.on('--help', () => {
@@ -502,7 +502,7 @@ export class Program {
writeLn(chalk.redBright(response.message), true); writeLn(chalk.redBright(response.message), true);
} }
} }
process.exit(1); process.exitCode = 1;
return; return;
} }
@@ -529,7 +529,8 @@ export class Program {
writeLn(out, true); writeLn(out, true);
} }
} }
process.exit(); process.exitCode = 0;
} }
private getJson(obj: any): string { private getJson(obj: any): string {