1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-18 17:23:27 +00:00

add --cleanexit option

This commit is contained in:
Thomas Rittson
2021-05-25 10:59:29 +10:00
parent 33c8f15e45
commit 1a9555d4af

View File

@@ -38,6 +38,7 @@ export class Program extends BaseProgram {
.option('--pretty', 'Format output. JSON is tabbed with two spaces.')
.option('--raw', 'Return raw output instead of a descriptive message.')
.option('--response', 'Return a JSON formatted version of response output.')
.option('--cleanexit', 'Exit with a success exit code (0) unless an error is thrown.')
.option('--quiet', 'Don\'t return anything to stdout.')
.option('--nointeraction', 'Do not prompt for interactive user input.')
.version(await this.main.platformUtilsService.getApplicationVersion(), '-v, --version');
@@ -58,6 +59,10 @@ export class Program extends BaseProgram {
process.env.BW_RESPONSE = 'true';
});
program.on('option:cleanexit', () => {
process.env.BW_CLEANEXIT = 'true';
});
program.on('option:nointeraction', () => {
process.env.BW_NOINTERACTION = 'true';
});