Skip to content

Commit 2d6b101

Browse files
committed
fix: Windows E2E - use cmd wrapper for detached process with log capture
Start-Process with -NoNewWindow and -RedirectStandardOutput may not fully detach the process on Windows CI runners. Use cmd.exe wrapper with -WindowStyle Hidden (matching the old working approach) while still capturing stdout/stderr via cmd redirection.
1 parent ec97323 commit 2d6b101

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/e2e-tests.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,14 @@ jobs:
118118
fi
119119
echo "✓ Binary size: $size bytes"
120120
121-
# Windows: use PowerShell Start-Process for reliable background process with log capture
121+
# Windows: use cmd wrapper to redirect output while keeping process detached
122122
- name: Start binary (Windows)
123123
if: matrix.can_execute == true && runner.os == 'Windows'
124124
shell: pwsh
125125
run: |
126-
$proc = Start-Process -FilePath ".\dist\${{ matrix.output }}" `
127-
-ArgumentList "--no-printers" `
128-
-RedirectStandardOutput "startup.log" `
129-
-RedirectStandardError "startup-err.log" `
130-
-NoNewWindow -PassThru
126+
$proc = Start-Process -FilePath "cmd.exe" `
127+
-ArgumentList "/c .\dist\${{ matrix.output }} --no-printers > startup.log 2> startup-err.log" `
128+
-WindowStyle Hidden -PassThru
131129
$proc.Id | Out-File -FilePath server.pid -Encoding ascii
132130
Write-Host "Started server with PID: $($proc.Id)"
133131

0 commit comments

Comments
 (0)