mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 18:30:42 +00:00
fix: avoid CLI startup warmup leaks
This commit is contained in:
@@ -30,12 +30,13 @@ async function registerSubCliWithPluginCommands(
|
||||
registerSubCli: () => Promise<void>,
|
||||
pluginCliPosition: "before" | "after",
|
||||
) {
|
||||
const isHelpOrVersion = resolveCliArgvInvocation(process.argv).hasHelpOrVersion;
|
||||
const { registerPluginCliCommandsFromValidatedConfig } = await import("../../plugins/cli.js");
|
||||
if (pluginCliPosition === "before") {
|
||||
if (pluginCliPosition === "before" && !isHelpOrVersion) {
|
||||
await registerPluginCliCommandsFromValidatedConfig(program);
|
||||
}
|
||||
await registerSubCli();
|
||||
if (pluginCliPosition === "after") {
|
||||
if (pluginCliPosition === "after" && !isHelpOrVersion) {
|
||||
await registerPluginCliCommandsFromValidatedConfig(program);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user