Bug Description
When I run uv sync --extra test, then uv run pytest. I got 16 failures.
All these are from the PowerShell script tests (test_setup_tasks.py, test_setup_plan_no_overwrite.py, test_setup_plan_feature_json.py, test_check_prerequisites_paths_only.py), even though I don't have PowerShell installed.
The bash equivalents of these tests skip cleanly, and so do most of the other PowerShell tests in the suite, so I expected these to skip too.
I think the cause is in how powershell gets detected:
_POWERSHELL = shutil.which("powershell.exe") or shutil.which("powershell")
Since it IS in the path, the tests then think PS is availible, but WSL cannot run the PS1 fixtures.
Steps to Reproduce
- On WSL (Windows interop enabled) without
pwsh/PowerShell installed inside Linux.
uv sync --extra test
uv run pytest -q
- 16 failures in the PowerShell script tests.
Expected Behavior
With no usable PowerShell available, the PowerShell tests skip (like the bash tests skip when bash isn't usable).
Actual Behavior
They run against the Windows powershell.exe exposed by WSL interop, which can't execute the Linux-path scripts, so they fail with empty output.
Specify CLI Version
0.10.2 (also reproduces on main, currently 1b0556c)
AI Agent
Not applicable
Operating System
Ubuntu on WSL2 (Windows 11 host)
Python Version
Python 3.12.12
Error Logs
FAILED tests/test_setup_tasks.py::test_powershell_command_hint_preserves_hyphens_inside_segments
assert result.stdout.strip() == "/speckit.jira.sync-status"
AssertionError: assert '' == '/speckit.jira.sync-status'
# Running the resolved exe directly shows why stdout is empty:
. : File \\wsl.localhost\Ubuntu\tmp\...\common.ps1 cannot be loaded because
running scripts is disabled on this system.
Format-SpecKitCommand : The term 'Format-SpecKitCommand' is not recognized...
Additional Context
Only affects WSL (interop exposing powershell.exe while pwsh is absent)
On native Linux without interop, powershell.exe isn't on PATH, _POWERSHELL is None, and the tests already skip. CI is unaffected: ubuntu-latest ships pwsh, and windows-latest keeps os.name == "nt"
Bug Description
When I run
uv sync --extra test, thenuv run pytest. I got 16 failures.All these are from the PowerShell script tests (
test_setup_tasks.py,test_setup_plan_no_overwrite.py,test_setup_plan_feature_json.py,test_check_prerequisites_paths_only.py), even though I don't have PowerShell installed.The bash equivalents of these tests skip cleanly, and so do most of the other PowerShell tests in the suite, so I expected these to skip too.
I think the cause is in how powershell gets detected:
Since it IS in the path, the tests then think PS is availible, but WSL cannot run the PS1 fixtures.
Steps to Reproduce
pwsh/PowerShell installed inside Linux.uv sync --extra testuv run pytest -qExpected Behavior
With no usable PowerShell available, the PowerShell tests skip (like the bash tests skip when bash isn't usable).
Actual Behavior
They run against the Windows
powershell.exeexposed by WSL interop, which can't execute the Linux-path scripts, so they fail with empty output.Specify CLI Version
0.10.2 (also reproduces on
main, currently1b0556c)AI Agent
Not applicable
Operating System
Ubuntu on WSL2 (Windows 11 host)
Python Version
Python 3.12.12
Error Logs
Additional Context
Only affects WSL (interop exposing
powershell.exewhilepwshis absent)On native Linux without interop, powershell.exe isn't on PATH, _POWERSHELL is None, and the tests already skip. CI is unaffected: ubuntu-latest ships pwsh, and windows-latest keeps os.name == "nt"