add support for --cleanexit option (#388)
This commit is contained in:
parent
bacb84ca78
commit
25917faf91
|
@ -21,10 +21,11 @@ export abstract class BaseProgram {
|
||||||
this.writeLn(chalk.redBright(response.message), true, true);
|
this.writeLn(chalk.redBright(response.message), true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const exitCode = process.env.BW_CLEANEXIT ? 0 : 1;
|
||||||
if (exitImmediately) {
|
if (exitImmediately) {
|
||||||
process.exit(1);
|
process.exit(exitCode);
|
||||||
} else {
|
} else {
|
||||||
process.exitCode = 1;
|
process.exitCode = exitCode;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue