Skip to content

Commit 8a31cbc

Browse files
committed
fix: Windows E2E cleanup - use taskkill/tasklist for reliable process matching
Get-Process -Name glob may not match the child exe spawned via cmd wrapper. Use taskkill /F /IM for stop and tasklist /FI for verify, which match on the exact executable filename.
1 parent 2d6b101 commit 8a31cbc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/e2e-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ jobs:
263263
Write-Host "Process already exited"
264264
}
265265
}
266-
# Fallback: kill by image name
267-
Get-Process -Name "flashforge-webui*" -ErrorAction SilentlyContinue | Stop-Process -Force
266+
# Fallback: kill by exact image name
267+
taskkill /F /IM "${{ matrix.output }}" 2>$null
268268
Start-Sleep -Seconds 3
269269
270270
# Unix cleanup
@@ -284,7 +284,7 @@ jobs:
284284
shell: bash
285285
run: |
286286
if [[ "${{ runner.os }}" == "Windows" ]]; then
287-
if powershell -Command "Get-Process -Name 'flashforge-webui*' -ErrorAction SilentlyContinue"; then
287+
if tasklist /FI "IMAGENAME eq ${{ matrix.output }}" 2>/dev/null | grep -q "${{ matrix.output }}"; then
288288
echo "::error::Binary left zombie processes"
289289
exit 1
290290
fi

0 commit comments

Comments
 (0)