mirror of https://github.com/openclaw/openclaw.git
Entry: avoid top-level return in version fast-path
This commit is contained in:
parent
7aa9267d00
commit
e4b4fd5ce8
22
src/entry.ts
22
src/entry.ts
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue