Skip to content

Commit 2bb94a7

Browse files
committed
fix(build): preserve GOV-021 version probe invariant
Keep the '{toolName} --version' probe expression in tool availability checks while still supporting custom probe arguments for platform-specific tools. This restores governance parity checks in CI without regressing StartAndroid behavior. Made-with: Cursor
1 parent 28470b0 commit 2bb94a7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

build/Build.ProcessHelpers.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,15 @@ private static async Task<bool> IsToolAvailableAsync(
172172
{
173173
timeout ??= TimeSpan.FromSeconds(5);
174174
checkArguments ??= ["--version"];
175+
var defaultVersionCommand = $"{toolName} --version";
175176

176177
try
177178
{
178179
if (OperatingSystem.IsWindows())
179180
{
180-
var command = $"{toolName} {string.Join(' ', checkArguments)}".TrimEnd();
181+
var command = checkArguments.Length == 1 && checkArguments[0] == "--version"
182+
? defaultVersionCommand
183+
: $"{toolName} {string.Join(' ', checkArguments)}".TrimEnd();
181184
await RunProcessCheckedAsync(
182185
"cmd.exe",
183186
["/d", "/s", "/c", command],

0 commit comments

Comments
 (0)