diff --git a/src/cli/channel-auth.test.ts b/src/cli/channel-auth.test.ts index 1c7d0c30242..9e049badbd5 100644 --- a/src/cli/channel-auth.test.ts +++ b/src/cli/channel-auth.test.ts @@ -353,7 +353,7 @@ describe("channel-auth", () => { }); await expect(runChannelLogin({ channel: "whatsapp" }, runtime)).rejects.toThrow( - 'Channel "whatsapp" does not support login. Run `openclaw channels status --channel whatsapp` to inspect supported actions.', + 'Channel "whatsapp" does not support login. Run openclaw channels status --channel whatsapp to inspect supported actions.', ); }); @@ -564,7 +564,7 @@ describe("channel-auth", () => { }); await expect(runChannelLogout({ channel: "whatsapp" }, runtime)).rejects.toThrow( - 'Channel "whatsapp" does not support logout. Run `openclaw channels status --channel whatsapp` to inspect supported actions.', + 'Channel "whatsapp" does not support logout. Run openclaw channels status --channel whatsapp to inspect supported actions.', ); }); }); diff --git a/src/cli/command-registration-policy.ts b/src/cli/command-registration-policy.ts index 1a7edb861fe..c3851e3f1a2 100644 --- a/src/cli/command-registration-policy.ts +++ b/src/cli/command-registration-policy.ts @@ -18,15 +18,15 @@ export function shouldSkipPluginCommandRegistration(params: { hasBuiltinPrimary: boolean; }): boolean { const invocation = resolveCliArgvInvocation(params.argv); + if (params.primary === "help") { + return invocation.hasHelpOrVersion && invocation.commandPath.length <= 1; + } if (invocation.hasHelpOrVersion) { return true; } if (params.hasBuiltinPrimary) { return true; } - if (params.primary === "help") { - return invocation.hasHelpOrVersion && invocation.commandPath.length <= 1; - } if (!params.primary) { return invocation.hasHelpOrVersion; } diff --git a/src/cli/plugins-cli.policy.test.ts b/src/cli/plugins-cli.policy.test.ts index d884a128953..96b4d587979 100644 --- a/src/cli/plugins-cli.policy.test.ts +++ b/src/cli/plugins-cli.policy.test.ts @@ -189,7 +189,7 @@ describe("plugins cli policy mutations", () => { ); expect(runtimeErrors).toContain( - "Plugin not found: missing-plugin. Run `openclaw plugins list` to see installed plugins, or `openclaw plugins search missing-plugin` to look for installable plugins.", + "Plugin not found: missing-plugin. Run openclaw plugins list to see installed plugins, or openclaw plugins search missing-plugin to look for installable plugins.", ); expect(enablePluginInConfig).not.toHaveBeenCalled(); expect(writeConfigFile).not.toHaveBeenCalled();