Skip to content

Commit 72018e0

Browse files
committed
ci: force exit 0 in audit smoke test (runner pwsh wrapper leaks LASTEXITCODE)
The runner-generated pwsh script ends with `if (Test-Path variable:\LASTEXITCODE) { exit $LASTEXITCODE }`, so the audit binary's documented exit 1 failed the step even after the new assertions printed findings: 12 successfully. An explicit exit 0 fixes it.
1 parent a83ecd0 commit 72018e0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ jobs:
4747
$count = @($json.findings).Count
4848
Write-Host "findings: $count"
4949
if ($count -lt 1) { Write-Error "audit produced no findings"; exit 1 }
50+
# Explicit exit: the runner's pwsh wrapper appends
51+
# `if (Test-Path variable:\LASTEXITCODE) { exit $LASTEXITCODE }`,
52+
# so the audit's own exit 1 would otherwise fail the step even
53+
# after every assertion above passed.
54+
exit 0
5055
5156
# Cross-compile from Linux: catches build-tag drift that would break
5257
# contributors on macOS/Linux running `go test ./...` with the stubs.

0 commit comments

Comments
 (0)