fix(shared): validate cloudflared with the version subcommand (#9880)
This commit is contained in:
1 parent
cb9a694236
commit
2c301fd0c4
2 files changed
+5
-2
No files matched your search
@@ -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,
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -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."),
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user