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

This commit is contained in:
maria authored and GitHub committed 2026-09-05 14:40:49 -04:00
1 parent cb9a694236
commit 2c301fd0c4
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -61,7 +61,10 @@ const makeSpawnerLayer = (commands: Array<string>) =>
ChildProcessSpawner.make((command) =>
Effect.sync(() => {
commands.push(ChildProcess.isStandardCommand(command) ? command.command : "piped-command");
return makeHandle();
// The pinned Windows executable rejects --version but accepts the version subcommand.
return makeHandle(
ChildProcess.isStandardCommand(command) && command.args.includes("--version") ? 1 : 0,
);
}),
),
);
+1 -1
View File
@@ -421,7 +421,7 @@ export const makeCloudflaredRelayClient = Effect.fn("cloudflared.make")(function
.pipe(wrapInstallFailure("write_failed", "Could not make the relay client executable."));
}
yield* report("validating");
yield* runCommand(executablePath, ["--version"]).pipe(
yield* runCommand(executablePath, ["version"]).pipe(
wrapInstallFailure("validation_failed", "The downloaded relay client binary did not run."),
);