mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 03:47:26 +00:00
Entry: avoid top-level return in version fast-path
This commit is contained in:
22
src/entry.ts
22
src/entry.ts
@@ -149,18 +149,16 @@ if (
|
|||||||
process.argv = parsed.argv;
|
process.argv = parsed.argv;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tryHandleRootVersionFastPath(process.argv)) {
|
if (!tryHandleRootVersionFastPath(process.argv)) {
|
||||||
return;
|
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;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user