summaryrefslogtreecommitdiff
path: root/scripts/sync-to-codex-plugin.sh
diff options
context:
space:
mode:
authorJesse Vincent <jesse@primeradiant.com>2026-05-23 16:58:56 -0700
committerDrew Ritter <drew@primeradiant.com>2026-06-16 10:09:44 -0700
commitce86e63eb6a22cbf543bb9780d3cc604466aa466 (patch)
treec0da31dda2d469603019acc4a3ddcf07449fc358 /scripts/sync-to-codex-plugin.sh
parentd72560e462a74e10d161b7f993d5fc3282bfa1e2 (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 'scripts/sync-to-codex-plugin.sh')
0 files changed, 0 insertions, 0 deletions