The best way to control Claude Code, Codex and more from any computer or phone
fix(shared): validate cloudflared with the version subcommand (#9880)
maria committed
Sep 5, 2026 at 14:40 UTC
2c301fd0c4fc58c1612be47c3856fa4ad547429d
2 files changed
+5
-2
packages/shared/src/relayClient.test.ts
+4
-1
@@ -61,7 +61,10 @@ const makeSpawnerLayer = (commands: Array<string>) =>
61
ChildProcessSpawner.make((command) =>
62
Effect.sync(() => {
63
commands.push(ChildProcess.isStandardCommand(command) ? command.command : "piped-command");
64
- return makeHandle();
64
+ // The pinned Windows executable rejects --version but accepts the version subcommand.
65
+ return makeHandle(
66
+ ChildProcess.isStandardCommand(command) && command.args.includes("--version") ? 1 : 0,
67
+ );
68
}),
69
),
70
);
packages/shared/src/relayClient.ts
+1
-1
@@ -421,7 +421,7 @@ export const makeCloudflaredRelayClient = Effect.fn("cloudflared.make")(function
421
.pipe(wrapInstallFailure("write_failed", "Could not make the relay client executable."));
422
}
423
yield* report("validating");
424
- yield* runCommand(executablePath, ["--version"]).pipe(
424
+ yield* runCommand(executablePath, ["version"]).pipe(
425
wrapInstallFailure("validation_failed", "The downloaded relay client binary did not run."),
426
);
427