From 48aaf6ce4eb3f6233391a6a1ba35a4d0555747fd Mon Sep 17 00:00:00 2001 From: Shakker Date: Sat, 31 Jan 2026 04:44:46 +0000 Subject: [PATCH] fix: suppress banner and doctor checks for completion command --- src/cli/program/preaction.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli/program/preaction.ts b/src/cli/program/preaction.ts index 310b8faaa..27d196ec0 100644 --- a/src/cli/program/preaction.ts +++ b/src/cli/program/preaction.ts @@ -31,6 +31,7 @@ export function registerPreActionHooks(program: Command, programVersion: string) const hideBanner = isTruthyEnvValue(process.env.OPENCLAW_HIDE_BANNER) || commandPath[0] === "update" || + commandPath[0] === "completion" || (commandPath[0] === "plugins" && commandPath[1] === "update"); if (!hideBanner) { emitCliBanner(programVersion); @@ -40,7 +41,7 @@ export function registerPreActionHooks(program: Command, programVersion: string) if (!verbose) { process.env.NODE_NO_WARNINGS ??= "1"; } - if (commandPath[0] === "doctor") return; + if (commandPath[0] === "doctor" || commandPath[0] === "completion") return; await ensureConfigReady({ runtime: defaultRuntime, commandPath }); // Load plugins for commands that need channel access if (PLUGIN_REQUIRED_COMMANDS.has(commandPath[0])) {