From 9503194a69e0af5cc9ab1d1c2f18928d56fbb5f3 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Wed, 7 Oct 2026 17:02:58 +0000 Subject: [PATCH] windows.yml smoke: a direct call with the exit code read, in place of Start-Process -Wait -PassThru that raced a program exiting at once (the 0.3.21 run's failure at the version read-back) Co-Authored-By: Claude Fable 5.1 --- .github/workflows/windows.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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