fix(publish): define $gh in Invoke-GhUpload - #326
Merged
Conversation
Invoke-GhUpload referenced $gh.Source without defining $gh, unlike Invoke-GhJson, Get-Release, and Get-RemoteAssetSha256 which all set $gh = Get-Command gh -ErrorAction Stop. Under Set-StrictMode -Version Latest this threw 'The variable `$gh` cannot be retrieved because it has not been set', failing release-publish at the first asset upload.
Finesssee
force-pushed
the
fix-publish-gh-var
branch
from
August 15, 2026 21:59
b2cabdf to
ee0cf0b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Invoke-GhUploadinscripts/publish-github-release.ps1referenced.Source(line 63) without ever defining ``. The three sibling functions all define it:Invoke-GhJson→= Get-Command gh -ErrorAction StopGet-Release→= Get-Command gh -ErrorAction StopGet-RemoteAssetSha256→= Get-Command gh -ErrorAction StopInvoke-GhUploadforgot to.Impact
Under
Set-StrictMode -Version Latest(line 21), the publish job throws at the first asset upload:This broke the
release-publishCircleCI job for tag v0.49.2.Fix
Add the missing
= Get-Command gh -ErrorAction Stopat the start ofInvoke-GhUpload, matching the sibling functions.Verified: PowerShell parser check passes (
PARSE_OK).