Skip to content

Commit 96712e1

Browse files
mvanhornclaude
andauthored
fix(scripts): add explicit positional binding to PowerShell create-new-feature params (#1885)
The $Number (Int32) parameter was implicitly receiving positional arguments intended for $FeatureDescription, causing a ParameterBindingArgumentTransformationException when AI agents called the script with positional strings. Add [Parameter(Position = 0)] to $FeatureDescription so it binds first, and mark $Number with [Parameter()] (no Position) so it only binds by name (-Number N). Fixes #1879 Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2e55bdd commit 96712e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/powershell/create-new-feature.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
param(
55
[switch]$Json,
66
[string]$ShortName,
7+
[Parameter()]
78
[int]$Number = 0,
89
[switch]$Help,
9-
[Parameter(ValueFromRemainingArguments = $true)]
10+
[Parameter(Position = 0, ValueFromRemainingArguments = $true)]
1011
[string[]]$FeatureDescription
1112
)
1213
$ErrorActionPreference = 'Stop'

0 commit comments

Comments
 (0)