Pass the release flag as part of one options array - #17
Merged
Conversation
The v0.4.0-rc.1 dispatch reached the publish step and failed with "no matches found for -". PowerShell unrolls a single-element array returned from an if expression, so $flags held the string "--prerelease" rather than an array, and splatting a scalar string left gh with a bare "-" to read as an asset filename. The @assets splat beside it works only because it always holds five elements and so never unrolls, which is what made the pattern look safe to copy. The flag now joins the other options in one array that always holds at least six elements, and += keeps it an array however many flags are added, so the shape no longer depends on how many there happen to be. The failed run proved everything ahead of it: the staged package verified byte-for-byte across a Linux-packaged zip and a Windows checkout, the tag and flag guard accepted the candidate tag, and both artifact uploads succeeded. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The
v0.4.0-rc.1dispatch got all the way to publishing and then failed:Cause
Mine, from #15:
PowerShell unrolls a single-element array returned from an
ifexpression, so$flagswas the string--prerelease, not an array. Splatting a scalar string is not splatting an array, andghended up with a bare-, which it tried to read as an asset filename.The
@assetssplat in the same command works only because it always holds five elements and so never unrolls — which is exactly what made the pattern look safe to copy.Fix
The flag joins the other options in one array that always holds at least six elements, so there is nothing that can unroll:
+=on an array stays an array regardless of length, so the shape no longer depends on how many flags happen to be added.What the failed run proved
It reached the publish step, so everything before it now works:
v0.4.0-rc.1without throwingNothing was published, so there is still no
v0.4.0-rc.1release or tag to clean up.Verification
Release quality gate
ALL PASS; workflow parses. The publish path cannot be executed anywhere but a real dispatch — there is no pwsh on this machine — so re-cutting the candidate is the test, as it was for this bug.🤖 Generated with Claude Code