Skip to content

Commit 44ca254

Browse files
committed
fix: validate tasks template is a file and normalize path in setup-tasks.ps1
1 parent 99a7524 commit 44ca254

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/powershell/setup-tasks.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ if (Test-Path $paths.QUICKSTART) { $docs += 'quickstart.md' }
4747

4848
# Resolve tasks template through override stack
4949
$tasksTemplate = Resolve-Template -TemplateName 'tasks-template' -RepoRoot $paths.REPO_ROOT
50-
if (-not $tasksTemplate) {
50+
if (-not $tasksTemplate -or -not (Test-Path -LiteralPath $tasksTemplate -PathType Leaf)) {
5151
$expectedCoreTemplate = Join-Path $paths.REPO_ROOT '.specify/templates/tasks-template.md'
5252
[Console]::Error.WriteLine("Tasks template not found for repository root: $($paths.REPO_ROOT)`nExpected shared/core template location: $expectedCoreTemplate`nTo continue, restore the shared templates (for example by re-running 'specify init') so that '.specify/templates/tasks-template.md' exists, or add a valid tasks-template override.")
5353
exit 1
5454
}
55+
$tasksTemplate = (Resolve-Path -LiteralPath $tasksTemplate).Path
5556

5657
# Output results
5758
if ($Json) {

0 commit comments

Comments
 (0)