From 260b84d09352287812930ebae6906ebd78c5ee76 Mon Sep 17 00:00:00 2001 From: Harrison Booth <73434116+Harrison-Booth@users.noreply.github.com> Date: Mon, 26 Oct 2026 07:47:06 -0500 Subject: [PATCH] Excel open check: a failed probe job is a CRASH, not an error that ends the run --- packaging/windows/excel-open-check/check.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packaging/windows/excel-open-check/check.ps1 b/packaging/windows/excel-open-check/check.ps1 index 68c9b1afc..c58a02fb5 100644 --- a/packaging/windows/excel-open-check/check.ps1 +++ b/packaging/windows/excel-open-check/check.ps1 @@ -57,12 +57,13 @@ function Test-InExcel([string]$path) { $clock = [Diagnostics.Stopwatch]::StartNew() $job = Start-Job -ScriptBlock $probe -ArgumentList $path $done = Wait-Job $job -Timeout $TimeoutSec - $lines = @(Receive-Job $job -Keep) + $lines = @(Receive-Job $job -Keep -ErrorAction SilentlyContinue) + $failed = $job.State -eq 'Failed' if (-not $done) { Stop-Job $job } Remove-Job $job -Force $xlPid = ($lines | Where-Object { $_ -like "PID`t*" } | Select-Object -First 1) -replace '^PID\t', '' $out = $lines | Where-Object { $_ -notlike "PID`t*" } | Select-Object -Last 1 - if (-not $done) { $out = "TIMEOUT`tno answer in $TimeoutSec s" } elseif (-not $out) { $out = "CRASH`tno result (Excel died)" } + if (-not $done) { $out = "TIMEOUT`tno answer in $TimeoutSec s" } elseif ($failed -or -not $out) { $out = "CRASH`tno result (Excel died)" } if ($xlPid) { # A clean Quit lets Excel exit by itself; give it a moment, then stop only this instance. Wait-Process -Id ([int]$xlPid) -Timeout 15 -ErrorAction SilentlyContinue