From 43791956c2e9e077d471781e0f60a1e9fc229a16 Mon Sep 17 00:00:00 2001 From: censujiang Date: Sun, 9 Mar 2025 04:24:32 +0800 Subject: [PATCH] fix: ensure process exits after running commands in main function --- src/main.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.ts b/src/main.ts index 49cb953..6be6bd6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -26,8 +26,10 @@ export async function runMain( throw new CLIError("No version specified", "E_NO_VERSION"); } consola.log(meta.version); + process.exit(0); } else { await runCommand(cmd, { rawArgs }); + process.exit(0); } } catch (error: any) { const isCLIError = error instanceof CLIError;