Skip to content

Commit 1fba7c5

Browse files
authored
ci(release): fix false-red btc-Windows --help smoke on PowerShell (#719)
The Windows smoke step piped a native command straight into Select-Object -First 5. --help writes usage to stderr; the -First 5 truncation closes the pipe early, so PowerShell raises a NativeCommandError and the step exits 1 even though the binary printed correct usage (build succeeded, link succeeded). Buffer the output into a variable first (exe runs to completion, no broken pipe), then Select-Object on the array, and exit 0 to match the Linux/macOS lanes, which already use || true. Smoke is a liveness check, not a gate. Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
1 parent 1737f37 commit 1fba7c5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,12 @@ jobs:
549549
if: steps.presence.outputs.exists == '1'
550550
run: |
551551
Copy-Item "${env:GITHUB_WORKSPACE}/secp256k1/bin/libsecp256k1-6.dll" build_ci/src/c2pool/Release/
552-
build_ci/src/c2pool/Release/c2pool-${{ matrix.coin }}.exe --help 2>&1 | Select-Object -First 5
552+
$ErrorActionPreference = 'SilentlyContinue'
553+
# --help writes usage to stderr; buffer first so Select-Object truncation
554+
# cannot break the pipe and surface a NativeCommandError (false red).
555+
$out = & build_ci/src/c2pool/Release/c2pool-${{ matrix.coin }}.exe --help 2>&1
556+
$out | Select-Object -First 5 | Write-Host
557+
exit 0
553558
554559
- name: Package
555560
if: steps.presence.outputs.exists == '1'

0 commit comments

Comments
 (0)