fix: accept ClickClack workspace before install

This commit is contained in:
Shakker
2026-07-15 13:05:10 +01:00
committed by Shakker
parent d1b839eaf6
commit b08b699de2
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -40,6 +40,15 @@ describe("registerChannelsCli", () => {
expect(listBundledPackageChannelMetadataMock).toHaveBeenCalledTimes(1);
});
it("registers workspace before an external channel plugin is installed", async () => {
process.argv = ["node", "openclaw", "channels", "add", "--help"];
const program = new Command().name("openclaw");
await registerChannelsCli(program);
expect(getChannelAddOptionFlags(program)).toContain("--workspace <workspace>");
});
it("uses caller argv instead of raw process argv for channel-specific add options", async () => {
process.argv = ["node", "openclaw", "channels"];
+1
View File
@@ -234,6 +234,7 @@ export async function registerChannelsCli(
.option("--cli-path <path>", "Channel CLI path")
.option("--url <url>", "Channel setup URL")
.option("--base-url <url>", "Channel base URL")
.option("--workspace <workspace>", "Channel workspace id, slug, or name")
.option("--http-url <url>", "Channel HTTP service URL")
.option("--auth-dir <path>", "Channel auth directory override")
.option("--use-env", "Use env-backed credentials when supported", false);