Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/powershell/create-new-feature.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,10 @@ if (-not $DryRun) {
if (-not (Test-Path -PathType Leaf $specFile)) {
$template = Resolve-Template -TemplateName 'spec-template' -RepoRoot $repoRoot
if ($template -and (Test-Path $template)) {
Copy-Item $template $specFile -Force
# Read the template content and write it to the spec file with UTF-8 encoding without BOM
$content = Get-Content -Raw -Encoding UTF8 -Path $template
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::WriteAllText($targetPath, $content, $utf8NoBom)
Comment thread
mnriem marked this conversation as resolved.
Outdated
} else {
New-Item -ItemType File -Path $specFile -Force | Out-Null
}
Expand Down
6 changes: 5 additions & 1 deletion scripts/powershell/setup-plan.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ New-Item -ItemType Directory -Path $paths.FEATURE_DIR -Force | Out-Null
# Copy plan template if it exists, otherwise note it or create empty file
$template = Resolve-Template -TemplateName 'plan-template' -RepoRoot $paths.REPO_ROOT
if ($template -and (Test-Path $template)) {
Copy-Item $template $paths.IMPL_PLAN -Force
# Read the template content and write it to the implementation plan file with UTF-8 encoding without BOM
# Read the template content as UTF-8 and write it to the implementation plan file with UTF-8 encoding without BOM
Comment thread
mnriem marked this conversation as resolved.
$content = Get-Content -Raw -Encoding UTF8 -Path $template
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::WriteAllText($paths.IMPL_PLAN, $content, $utf8NoBom)
Write-Output "Copied plan template to $($paths.IMPL_PLAN)"
} else {
Write-Warning "Plan template not found"
Expand Down