Skip to content

fix(tag): bind tag-release.ps1 arguments by name, not position - #191

Merged
stozo04 merged 1 commit into
mainfrom
fix/tag-splat-hashtable
Sep 8, 2026
Merged

stozo04 merged 1 commit into
mainfrom
fix/tag-splat-hashtable

Conversation

@stozo04

@stozo04 stozo04 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Run 34236210310 failed with:

A positional parameter cannot be found that accepts argument '-Title'.

My bug. I built the arguments as an array and expanded it into the script. Array expansion binds by position, so given tag-release.ps1's parameter order (Version, Sha, Title, NotesFile) the run actually passed:

bound to value
$Version -Version
$Sha 1.0.52
$Title -Sha
$NotesFile a1517e5…
-Title had no position left → error

The parameter names were being passed as values. A hash table binds by name, which is what this needed all along.

Also switched the inputs to environment variables instead of interpolating them into the script text, so a release title containing a quote can't break the parse.

Nothing was created by the failed run. Parameter binding failed before the script body executed, so there's no partial tag or draft release to clean up — safe to re-dispatch with the same inputs.

Worth noting what the failed run did prove: the artifact download and the bundle-matches-the-sha check both ran and passed, so openloop-1.0.52-52.aab is present in run 34164631594 and still verifies against a1517e5.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Miqsf1M14nY5TKiZHzyjNY


Note

Low Risk
CI-only change to argument binding for the release tagging workflow; no app runtime or auth logic affected.

Overview
Fixes the Cut the tag and release step in .github/workflows/tag.yml so tag-release.ps1 receives parameters correctly when optional -Title and -NotesFile are used.

The workflow now builds a hashtable and splats it (@tagArgs) instead of an array. Array splatting bound -Version, -Sha, etc. as positional values and caused A positional parameter cannot be found that accepts argument '-Title'.

Workflow inputs are passed via env (VERSION, SHA, TITLE, USE_NOTES) rather than embedding ${{ inputs.* }} in the script, so release titles with quotes cannot break PowerShell parsing. Inline comments document both behaviors.

Reviewed by Cursor Bugbot for commit ee96a3f. Bugbot is set up for automated code reviews on this repo. Configure here.

Run 34236210310 died with "A positional parameter cannot be found that
accepts argument '-Title'". Expanding an ARRAY into a PowerShell script binds
every element by position, so '-Version' landed in $Version, '1.0.52' in $Sha,
'-Sha' in $Title, and '-Title' had no position left to bind to. The parameter
names were being passed as values.

A hash table binds by name, which is what this needed. Inputs now arrive as
environment variables rather than being interpolated into the script text, so
a title containing a quote cannot break the parse either.
@stozo04
stozo04 merged commit 6487a33 into main Sep 8, 2026
3 checks passed
@stozo04
stozo04 deleted the fix/tag-splat-hashtable branch September 8, 2026 14:15
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