Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

Mergedmaria-rcksmerged 1 commit intomain fromrefs/pull/9880/headmerged by maria-rcks View on GitHub

Showing 2 changed files with 5 additions and 2 deletions.

x
0 of 2 viewed, 2 left
4 additions and 1 deletionpackages/shared/src/relayClient.test.tsModified
View file
@@ -61,7 +61,10 @@
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 addition and 1 deletionpackages/shared/src/relayClient.tsModified
View file
@@ -421,7 +421,7 @@
.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."),
​