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>) =>...@@ -61,7 +61,10 @@ const makeSpawnerLayer = (commands: Array<string>) =>
61 ChildProcessSpawner.make((command) =>61 ChildProcessSpawner.make((command) =>
62 Effect.sync(() => {62 Effect.sync(() => {
63 commands.push(ChildProcess.isStandardCommand(command) ? command.command : "piped-command");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 );
65 }),68 }),
66 ),69 ),
67 );70 );
packages/shared/src/relayClient.ts+1-1
...@@ -421,7 +421,7 @@ export const makeCloudflaredRelayClient = Effect.fn("cloudflared.make")(function...@@ -421,7 +421,7 @@ export const makeCloudflaredRelayClient = Effect.fn("cloudflared.make")(function
421 .pipe(wrapInstallFailure("write_failed", "Could not make the relay client executable."));421 .pipe(wrapInstallFailure("write_failed", "Could not make the relay client executable."));
422 }422 }
423 yield* report("validating");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."),425 wrapInstallFailure("validation_failed", "The downloaded relay client binary did not run."),
426 );426 );
427427