Skip to content

Commit c1c467c

Browse files
committed
fix(powershell): add -Force to New-Item fallback for idempotent spec creation
The template path uses Copy-Item -Force but the fallback New-Item lacked -Force, causing failures on reruns when spec.md already exists due to $ErrorActionPreference = 'Stop'. Assisted-By: 🤖 Claude Code
1 parent e2a5303 commit c1c467c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/powershell/create-new-feature.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ if (-not $DryRun) {
288288
if ($template -and (Test-Path $template)) {
289289
Copy-Item $template $specFile -Force
290290
} else {
291-
New-Item -ItemType File -Path $specFile | Out-Null
291+
New-Item -ItemType File -Path $specFile -Force | Out-Null
292292
}
293293

294294
# Set the SPECIFY_FEATURE environment variable for the current session

0 commit comments

Comments
 (0)