Entry: avoid top-level return in version fast-path

This commit is contained in:
Vincent Koc
2026-03-01 12:22:00 -08:00
parent 7aa9267d00
commit e4b4fd5ce8

View File

@@ -149,18 +149,16 @@ if (
process.argv = parsed.argv;
}
if (tryHandleRootVersionFastPath(process.argv)) {
return;
if (!tryHandleRootVersionFastPath(process.argv)) {
import("./cli/run-main.js")
.then(({ runCli }) => runCli(process.argv))
.catch((error) => {
console.error(
"[openclaw] Failed to start CLI:",
error instanceof Error ? (error.stack ?? error.message) : error,
);
process.exitCode = 1;
});
}
import("./cli/run-main.js")
.then(({ runCli }) => runCli(process.argv))
.catch((error) => {
console.error(
"[openclaw] Failed to start CLI:",
error instanceof Error ? (error.stack ?? error.message) : error,
);
process.exitCode = 1;
});
}
}