diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 82aa2f60..74bb17f8 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -216,11 +216,13 @@ jobs: run: | $payload = Resolve-Path 'packaging\windows\igneum-windows-app' function Run-Capture([string]$exe, [string]$flag) { - $out = Join-Path $env:RUNNER_TEMP ('smoke-' + [IO.Path]::GetRandomFileName() + '.txt') - $p = Start-Process -FilePath $exe -ArgumentList $flag -Wait -NoNewWindow -PassThru -RedirectStandardOutput $out - $text = if (Test-Path $out) { (Get-Content $out -Raw) } else { '' } - Write-Host ("{0} {1} -> exit {2}: {3}" -f (Split-Path -Leaf $exe), $flag, $p.ExitCode, $text.Trim()) - if ($p.ExitCode -ne 0) { throw "$exe $flag exited $($p.ExitCode)" } + # a direct call, not Start-Process -Wait -PassThru: a program that prints and exits at once raced the cmdlet + # ("Cannot process request because the process has exited", 7 October 2026, the 0.3.21 run) and the read-back + # was lost; the host program is a windows-subsystem exe, so its text comes through the same pipe + $text = (& $exe $flag 2>&1 | Out-String) + $code = $LASTEXITCODE + Write-Host ("{0} {1} -> exit {2}: {3}" -f (Split-Path -Leaf $exe), $flag, $code, $text.Trim()) + if ($code -ne 0) { throw "$exe $flag exited $code" } return $text } $v = $env:APP_VERSION