claude-code
claude-code copied to clipboard
fix(ralph-wiggum): Add Windows compatibility for stop hook
Summary
The ralph-wiggum plugin's stop hook fails on Windows with:
Stop hook error: Failed with non-blocking status code: <3>WSL (9 - Relay) ERROR: CreateProcessCommon:640:
execvpe(/bin/bash) failed: No such file or directory
Root cause: stop-hook.sh uses #!/bin/bash shebang which tries to invoke /bin/bash (Linux path). On Windows, this path doesn't exist and the system tries WSL which may not be available.
Solution: Added run-hook.cmd polyglot wrapper that:
- On Windows: Routes to Git Bash (
C:\Program Files\Git\bin\bash.exe) - On Unix: Passes through to the shell script directly
This follows the same pattern used by the superpowers plugin.
Changes
- Added
plugins/ralph-wiggum/hooks/run-hook.cmd- polyglot wrapper script - Updated
plugins/ralph-wiggum/hooks/hooks.jsonto use the wrapper
Test plan
- [x] Verified wrapper executes successfully on Windows
- [x] Verified Git Bash path exists on standard Git for Windows installation
- [x] Pattern matches working superpowers plugin implementation