Skip to content

Commit 059adbc

Browse files
committed
fix: address copilot feedback (encoding detection and variable naming)
1 parent a6cbcad commit 059adbc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scripts/powershell/create-new-feature.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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 -Encoding UTF8 -Path $template
354+
$content = [System.IO.File]::ReadAllText($template)
355355
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
356-
[System.IO.File]::WriteAllText($targetPath, $content, $utf8NoBom)
356+
[System.IO.File]::WriteAllText($specFile, $content, $utf8NoBom)
357357
} else {
358358
New-Item -ItemType File -Path $specFile -Force | Out-Null
359359
}

scripts/powershell/setup-plan.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ $template = Resolve-Template -TemplateName 'plan-template' -RepoRoot $paths.REPO
3636
if ($template -and (Test-Path $template)) {
3737
# Read the template content and write it to the implementation plan file with UTF-8 encoding without BOM
3838
# 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
39+
# Read the template content and write it to the implementation plan file with UTF-8 encoding without BOM
40+
$content = [System.IO.File]::ReadAllText($template)
4041
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
4142
[System.IO.File]::WriteAllText($paths.IMPL_PLAN, $content, $utf8NoBom)
42-
Write-Output "Copied plan template to $($paths.IMPL_PLAN)"
4343
} else {
4444
Write-Warning "Plan template not found"
4545
# Create a basic plan file if template doesn't exist

0 commit comments

Comments
 (0)