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) <noreply@anthropic.com>
This commit is contained in:
@@ -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: |
|
||||
|
||||
Reference in New Issue
Block a user