chore(core): Fail the cli commands with correct exit code (#17291)

This commit is contained in:
Andreas Fitzek
2025-07-15 17:50:47 +02:00
committed by GitHub
parent f888b3353b
commit 56ef0dbb77

View File

@@ -282,7 +282,8 @@ export abstract class BaseCommand<F = never> {
await sleep(100); // give any in-flight query some time to finish
await this.dbConnection.close();
}
process.exit();
const exitCode = error ? 1 : 0;
process.exit(exitCode);
}
protected onTerminationSignal(signal: string) {