mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 17:00:43 +00:00
fix(cli): fast-path bare channels help (#77659)
* fix(cli): fast-path bare channels help * fix(cli): normalize channels add argv gating * fix(cli): restore channel add completion flags
This commit is contained in:
@@ -97,7 +97,9 @@ describe("completion-cli write-state", () => {
|
||||
expect(await fs.readdir(cacheDir)).toEqual(
|
||||
expect.arrayContaining(["openclaw.bash", "openclaw.fish", "openclaw.ps1", "openclaw.zsh"]),
|
||||
);
|
||||
expect(registerSubCliByNameMock).toHaveBeenCalledWith(program, "qa");
|
||||
expect(registerSubCliByNameMock).toHaveBeenCalledWith(program, "qa", expect.any(Array), {
|
||||
purpose: "completion",
|
||||
});
|
||||
expect(registerPluginCliCommandsFromValidatedConfigMock).toHaveBeenCalledTimes(1);
|
||||
expect(stderrWrites).toHaveBeenCalledWith(
|
||||
expect.stringContaining("skipping subcommand `qa` while building completion cache"),
|
||||
@@ -126,7 +128,9 @@ describe("completion-cli write-state", () => {
|
||||
|
||||
await program.parseAsync(["completion", "--write-state"], { from: "user" });
|
||||
|
||||
expect(registerSubCliByNameMock).toHaveBeenCalledWith(program, "qa");
|
||||
expect(registerSubCliByNameMock).toHaveBeenCalledWith(program, "qa", expect.any(Array), {
|
||||
purpose: "completion",
|
||||
});
|
||||
expect(registerPluginCliCommandsFromValidatedConfigMock).not.toHaveBeenCalled();
|
||||
expect(await fs.readdir(path.join(stateDir, "completions"))).toEqual(
|
||||
expect.arrayContaining(["openclaw.bash", "openclaw.fish", "openclaw.ps1", "openclaw.zsh"]),
|
||||
|
||||
Reference in New Issue
Block a user