Skip to content

Wrap gh API calls in ErrorActionPreference Continue - #325

Merged
Finesssee merged 1 commit into
mainfrom
fix/circleci-gh-ea-continue
Aug 15, 2026
Merged

Wrap gh API calls in ErrorActionPreference Continue#325
Finesssee merged 1 commit into
mainfrom
fix/circleci-gh-ea-continue

Conversation

@Finesssee

Copy link
Copy Markdown
Collaborator

Summary

  • wrap all gh CLI invocations in Get-Release, Invoke-GhJson, and Invoke-GhUpload with try/finally ErrorActionPreference=Continue
  • gh writes errors to stderr (e.g. HTTP 404 when querying a non-existent release); with script-level ErrorActionPreference=Stop, stderr triggers a terminating error before LASTEXITCODE can be checked

Root cause

Pipeline #40: gh was found and invoked successfully. Get-Release queried repos/nesszer/Win-CodexBar/releases/tags/v0.49.2 and got HTTP 404 (no release exists yet). gh wrote the 404 to stderr, and ErrorActionPreference=Stop threw immediately instead of checking the 404 and returning null to create a new draft release.

Validation

  • release-pipeline.tests.ps1 passed
  • circleci config validate passed
  • no version files changed

@Finesssee
Finesssee merged commit 3283f44 into main Aug 15, 2026
2 checks passed
@Finesssee
Finesssee deleted the fix/circleci-gh-ea-continue branch August 15, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant