File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -351,9 +351,9 @@ if (-not $DryRun) {
351351 $template = Resolve-Template - TemplateName ' spec-template' - RepoRoot $repoRoot
352352 if ($template -and (Test-Path $template )) {
353353 # Read the template content and write it to the spec file with UTF-8 encoding without BOM
354- $content = Get-Content - Raw - Path $template
355- $Utf8NoBom = New-Object System.Text.UTF8Encoding($false )
356- [System.IO.File ]::WriteAllText($specFile , $content , $Utf8NoBom )
354+ $content = Get-Content - Raw - Encoding UTF8 - Path $template
355+ $utf8NoBom = New-Object System.Text.UTF8Encoding($false )
356+ [System.IO.File ]::WriteAllText($targetPath , $content , $utf8NoBom )
357357 } else {
358358 New-Item - ItemType File - Path $specFile - Force | Out-Null
359359 }
Original file line number Diff line number Diff line change @@ -35,9 +35,10 @@ New-Item -ItemType Directory -Path $paths.FEATURE_DIR -Force | Out-Null
3535$template = Resolve-Template - TemplateName ' plan-template' - RepoRoot $paths.REPO_ROOT
3636if ($template -and (Test-Path $template )) {
3737 # Read the template content and write it to the implementation plan file with UTF-8 encoding without BOM
38- $content = Get-Content - Raw - Path $template
39- $Utf8NoBom = New-Object System.Text.UTF8Encoding($false )
40- [System.IO.File ]::WriteAllText($paths.IMPL_PLAN , $content , $Utf8NoBom )
38+ # Read the template content as UTF-8 and write it to the implementation plan file with UTF-8 encoding without BOM
39+ $content = Get-Content - Raw - Encoding UTF8 - Path $template
40+ $utf8NoBom = New-Object System.Text.UTF8Encoding($false )
41+ [System.IO.File ]::WriteAllText($paths.IMPL_PLAN , $content , $utf8NoBom )
4142 Write-Output " Copied plan template to $ ( $paths.IMPL_PLAN ) "
4243} else {
4344 Write-Warning " Plan template not found"
You can’t perform that action at this time.
0 commit comments