From 9e0116a4bf323a40d37bb6393d48de71543cc2a6 Mon Sep 17 00:00:00 2001 From: Etienne Noel Date: Sat, 23 Nov 2024 13:51:35 -0800 Subject: [PATCH] - Actually return the exit code. --- packages/cli/src/cli.ts | 2 +- packages/cli/src/event-handlers/cli.event-handler.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index 9e0e2599..1b7a5aae 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -95,7 +95,7 @@ export const bootstrap = async () => { const kernel = new Kernel(); await kernel.start(localAppModule, configuration); - await kernel.handle(process.argv, {keyname: ExecutionContextKeynameEnum.Cli, context: null}) + await kernel.handle(process.argv, {keyname: ExecutionContextKeynameEnum.Cli, context: null}); } bootstrap(); diff --git a/packages/cli/src/event-handlers/cli.event-handler.ts b/packages/cli/src/event-handlers/cli.event-handler.ts index 21400cb8..cbb54a9d 100644 --- a/packages/cli/src/event-handlers/cli.event-handler.ts +++ b/packages/cli/src/event-handlers/cli.event-handler.ts @@ -82,9 +82,9 @@ export class CliEventHandler implements EventHandlerInterface{ break; } - this.consoleManager.writeLine("Command '" + event.payload.name + "' exited with code: '" + exitCode + "' (Status: '" + status + "')"); + this.consoleManager.writeLine(`[status:'${status}', code:'${exitCode}'] - Command '` + event.payload.name + "' exited."); - return new CommandEventResponse(event, exitCode); + process.exit(exitCode); } supports(event: Event): boolean {