Nest command unhandled error process exit 1 (#20312)

# Introduction
When running the `run-instance-commands` on a migration failure the
process wouldn't throw at all
Leading to conditional flow to keep going whereas it should have stopped
This update is very invasive and impacts all the nest commander
registered commands
We should keep in mind that it impacts the way we create and init
database and so on

But I think that's for the best, as cli that never exit 1 is
counterintuitive
This commit is contained in:
Paul Rastoin
2026-05-06 11:26:42 +02:00
committed by GitHub
parent 0608bae9ae
commit 26874c3603
3 changed files with 24 additions and 12 deletions
@@ -13,6 +13,8 @@ async function bootstrap() {
if (shouldCaptureException(err)) {
exceptionHandlerService.captureExceptions([err]);
}
process.exitCode = 1;
};
const app = await CommandFactory.createWithoutRunning(CommandModule, {