spec-kit
spec-kit copied to clipboard
Fix paths-only validation in check-prerequisites
Fixes #2477.
- Move branch validation after the paths-only early exit in bash and PowerShell
- Add a regression test for paths-only on a non-feature branch
Validated with:
- bash scripts/bash/check-prerequisites.sh --json --paths-only
- bash scripts/bash/check-prerequisites.sh --json (still fails on main as expected)
Please address Copilot feedback. If not applicable, please explain why
Addressed the Copilot feedback in the regression test fixture:
- initialize the temp repo directly on
mainand create an initial empty commit so branch detection is stable - strip
SPECIFY_FEATUREandSPECIFY_FEATURE_DIRECTORYfrom the Bash/PowerShell test subprocess environments
Validation: uv sync --extra test && uv run python -m pytest tests/test_check_prerequisites_paths_only.py (1 passed, 1 skipped because pwsh is not available locally).