spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

Fix paths-only validation in check-prerequisites

Open prantikmedhi opened this issue 6 months ago • 2 comments

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)

prantikmedhi avatar May 15 '26 04:05 prantikmedhi

Please address Copilot feedback. If not applicable, please explain why

mnriem avatar May 18 '26 11:05 mnriem

Addressed the Copilot feedback in the regression test fixture:

  • initialize the temp repo directly on main and create an initial empty commit so branch detection is stable
  • strip SPECIFY_FEATURE and SPECIFY_FEATURE_DIRECTORY from 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).

prantikmedhi avatar May 25 '26 14:05 prantikmedhi