summaryrefslogtreecommitdiff
path: root/tests/opencode/test-plugin-loading.sh
diff options
context:
space:
mode:
authorJesse Vincent <jesse@primeradiant.com>2026-05-23 16:58:56 -0700
committerJesse Vincent <jesse@primeradiant.com>2026-05-23 16:58:56 -0700
commita8f0738e3a76f3ade5530af9bd0c37cedadd3c44 (patch)
treeea6d7b980028c09e408752c0c969adca09a77ddc /tests/opencode/test-plugin-loading.sh
parentf36bad5b78d04c7aaef7f9f45df92d6734c02e73 (diff)
Probe per-user Git Bash and Scoop before falling back to PATH on Windows
Stock Windows 10/11 ships C:\Windows\System32\bash.exe (the WSL launcher) as the first match for `where bash`. WSL's bash cannot execute Windows-style script paths, so when Git Bash is installed outside the two standard system locations -- specifically the per-user "Only for me" Git for Windows installer (%LOCALAPPDATA%\Programs\Git) or a Scoop install (%USERPROFILE%\scoop\apps\git\current\usr\bin) -- run-hook.cmd silently fails: WSL prints "Windows Subsystem for Linux must be updated", the script returns 0, and Superpowers' SessionStart bootstrap is never injected. From the user's perspective skills auto-trigger inconsistently or not at all, with no surfaced error. Add explicit probes for both locations between the existing system- wide Git for Windows checks and the `where bash` fallback. Also add a comment to the fallback documenting the WSL-launcher trap so future maintainers understand why the explicit probes must come first. Verified on a Windows 11 VM (dockur/windows 11, Git Bash 2.x, Node 22): - System Git present: existing probe still matches (no regression) - System Git absent, per-user Git present via junction: new probe matches, hook produces valid 6422-byte JSON, exit 0 - All Git probes absent: confirmed WSL trap fires ("Windows Subsystem for Linux must be updated") and the hook exits 0 silently, demonstrating the original bug Existing tests/hooks/test-session-start.sh still passes on macOS (7/7). Reported by @ytchenak in #1607. Co-authored-by: ytchenak <ytchenak@users.noreply.github.com> Closes #1607.
Diffstat (limited to 'tests/opencode/test-plugin-loading.sh')
0 files changed, 0 insertions, 0 deletions