1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

add support for --cleanexit option (#388)

This commit is contained in:
Thomas Rittson 2021-05-26 07:39:40 +10:00 committed by GitHub
parent bacb84ca78
commit 25917faf91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,10 +21,11 @@ export abstract class BaseProgram {
this.writeLn(chalk.redBright(response.message), true, true);
}
}
const exitCode = process.env.BW_CLEANEXIT ? 0 : 1;
if (exitImmediately) {
process.exit(1);
process.exit(exitCode);
} else {
process.exitCode = 1;
process.exitCode = exitCode;
}
return;
}