authorgravatar for maria@kuuro.netmaria <maria@kuuro.net> 2026-09-05 14:40:49-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 14:40:49-04:00
log2c301fd0c4fc58c1612be47c3856fa4ad547429d
treec4abfb37328a5725f234eba4f84faa00d47b917b
parentcb9a6942363ed7f097c7d1fb075bf3a265fbf5d2
signature Signed by PGP key B5690EEEBB952194

fix(shared): validate cloudflared with the version subcommand (#9880)


2 files changed, 5 insertions(+), 2 deletions(-)

packages/shared/src/relayClient.test.ts+4-1
......@@ -61,7 +61,10 @@ const makeSpawnerLayer = (commands: Array<string>) =>
6161 ChildProcessSpawner.make((command) =>
6262 Effect.sync(() => {
6363 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 );
6568 }),
6669 ),
6770 );
packages/shared/src/relayClient.ts+1-1
......@@ -421,7 +421,7 @@ export const makeCloudflaredRelayClient = Effect.fn("cloudflared.make")(function
421421 .pipe(wrapInstallFailure("write_failed", "Could not make the relay client executable."));
422422 }
423423 yield* report("validating");
424 yield* runCommand(executablePath, ["--version"]).pipe(
424 yield* runCommand(executablePath, ["version"]).pipe(
425425 wrapInstallFailure("validation_failed", "The downloaded relay client binary did not run."),
426426 );
427427