From 62b9030d2a0227b5b614ed357bcf7714ba5ef1b5 Mon Sep 17 00:00:00 2001 From: feder-cr <85809106+feder-cr@users.noreply.github.com> Date: Mon, 25 May 2026 07:25:23 -0700 Subject: [PATCH] ci: fix firefox --version check (stdout match, not exit code) firefox.exe --version on Windows prints the version string but may return non-zero exit code (sub-process fork quirk). The previous check treated that as a launch failure, producing a false-positive failure across the whole matrix while the binary actually launched cleanly. Switch to matching the printed output instead, so we only fail when the binary really can't start. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/firefox-launch-matrix.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/firefox-launch-matrix.yml b/.github/workflows/firefox-launch-matrix.yml index c3ab63f..4e7b053 100644 --- a/.github/workflows/firefox-launch-matrix.yml +++ b/.github/workflows/firefox-launch-matrix.yml @@ -71,11 +71,15 @@ jobs: exit 1 } Write-Host "Launching: $ffPath --version" - & $ffPath --version - if ($LASTEXITCODE -ne 0) { - Write-Error "firefox.exe --version returned $LASTEXITCODE" - exit $LASTEXITCODE + # NOTE: firefox.exe --version on Windows prints the version but may + # return non-zero exit code (sub-process fork quirk). Check stdout. + $output = & $ffPath --version 2>&1 | Out-String + Write-Host "Output: $output" + if ($output -notmatch 'Mozilla Firefox \d') { + Write-Error "firefox.exe --version did not print a Mozilla Firefox version. Output was: $output" + exit 1 } + Write-Host "OK: firefox.exe runs and prints version." - name: Run reporter's exact InvisiblePlaywright snippet run: |