Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug]: Test-FeatureJsonMatchesFeatureDir was missing in common.ps1 — this was a missing function that caused setup-tasks.ps1 to fail.

Aperta Adatta ai principianti
#2,721 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
powershell
Ambito
cli, tooling

Direzione di ricerca

Inizia da .specify/scripts/powershell/common.ps1 e dalla chiamata da .specify/scripts/powershell/setup-tasks.ps1. Riproduci il problema con setup-tasks.ps1 -Json in PowerShell, quindi verifica che Test-FeatureJsonMatchesFeatureDir sia disponibile e che la validazione della directory delle funzionalità venga completata senza gli errori di comando o del parser segnalati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

stale
Bug Description

On start of /speckit.tasks in PowerShell environment, it attempts to call function
Test-FeatureJsonMatchesFeatureDir
An error is thrown and there is no such commandlet.

CoPilot eventually worked around the problem.

.\.specify\scripts\powershell\setup-tasks.ps1 -Json
C:\Code\private\app\.specify\scripts\powershell\setup-tasks.ps1 : The term 
'Test-FeatureJsonMatchesFeatureDir' is not recognized as the name of a cmdlet, function, script file, or 
operable program. Check the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At line:1 char:1
+ .\.specify\scripts\powershell\setup-tasks.ps1 -Json
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Test-FeatureJsonMatchesFeatureDir:String) [setup-tasks.ps1] 
   , CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,setup-tasks.ps1
Steps to Reproduce

1: Run /speckit.tasks
2: Errors noted for missing function Test-FeatureJsonMatchesFeatureDir

The function checks if feature.json pins an existing feature directory, and if it does, branch naming validation gets skipped.

Since the function is missing from common.ps1, this validation logic can't run.

Expected Behavior

No error should have been reported.

Actual Behavior
.\.specify\scripts\powershell\setup-tasks.ps1 -Json
C:\Code\private\app\.specify\scripts\powershell\setup-tasks.ps1 : The term 
'Test-FeatureJsonMatchesFeatureDir' is not recognized as the name of a cmdlet, function, script file, or 
operable program. Check the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At line:1 char:1
+ .\.specify\scripts\powershell\setup-tasks.ps1 -Json
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Test-FeatureJsonMatchesFeatureDir:String) [setup-tasks.ps1] 
   , CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,setup-tasks.ps1

Since the function is missing from common.ps1, this validation logic can't run.

CoPilot eventually determined what the function should have returned and worked around the problem.

Specify CLI Version

0.8.13

AI Agent

GitHub Copilot

Operating System

Windows 11 (10.0.26220)

Python Version

Python 3.12.6

Error Logs
.\.specify\scripts\powershell\setup-tasks.ps1 -Json
C:\Code\private\app\.specify\scripts\powershell\setup-tasks.ps1 : At 
C:\Code\private\app\.specify\scripts\powershell\common.ps1:141 char:122
+ ... -Path $RepoRoot $pinnedRelative) -ErrorAction SilentlyContinue)?.Path
+                                                                    ~~~~~~
Unexpected token '?.Path' in expression or statement.
At C:\Code\private\app\.specify\scripts\powershell\common.ps1:142 char:102
+ ... h -LiteralPath $ActiveFeatureDir -ErrorAction SilentlyContinue)?.Path
+                                                                    ~~~~~~
Unexpected token '?.Path' in expression or statement.
At line:1 char:1
+ .\.specify\scripts\powershell\setup-tasks.ps1 -Json
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ParserError: (:) [setup-tasks.ps1], ParseException
    + FullyQualifiedErrorId : UnexpectedToken,setup-tasks.ps1
Additional Context

This speckit was in-place upgraded from a previous version ~ 1 month old

Lingua principale
Python
Stelle
138k
Fork
12.4k
Merge medio
3g 6h
PR unite (30g)
145

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/spec-kit

Tutte le issue di github/spec-kit

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.