Summary
All hook scripts in the plugin use #!/bin/bash as their shebang. On NixOS (and other non-FHS Linux distros), /bin/bash does not exist — bash lives in the Nix store and is only reachable via $PATH. This causes every hook to fail at startup with:
PostToolUse:Bash hook error
Failed with non-blocking status code: /bin/sh: /path/to/scripts/on-post-tool-use.sh: /bin/bash: bad interpreter: No such file or directory
Affected files
All .sh scripts under scripts/ and scripts/legacy/:
on-post-tool-use.sh
on-session-start.sh
on-prompt-submit.sh
on-stop.sh
on-permission-request.sh
on-notification.sh
build-payload.sh
emit-terminal-sequence.sh
should-use-structured.sh
warp-notify.sh
legacy/on-session-start.sh
legacy/on-stop.sh
legacy/on-notification.sh
legacy/warp-notify.sh
Fix
Replace #!/bin/bash with #!/usr/bin/env bash in all scripts. /usr/bin/env is available on NixOS (and is the standard portable shebang for bash scripts on non-FHS systems).
find scripts/ -name "*.sh" | xargs sed -i 's|^#!/bin/bash|#!/usr/bin/env bash|'
Environment
- OS: NixOS (non-FHS filesystem — no
/bin/bash)
- Claude Code: latest
- Plugin: claude-code-warp 2.1.0
Summary
All hook scripts in the plugin use
#!/bin/bashas their shebang. On NixOS (and other non-FHS Linux distros),/bin/bashdoes not exist — bash lives in the Nix store and is only reachable via$PATH. This causes every hook to fail at startup with:Affected files
All
.shscripts underscripts/andscripts/legacy/:on-post-tool-use.shon-session-start.shon-prompt-submit.shon-stop.shon-permission-request.shon-notification.shbuild-payload.shemit-terminal-sequence.shshould-use-structured.shwarp-notify.shlegacy/on-session-start.shlegacy/on-stop.shlegacy/on-notification.shlegacy/warp-notify.shFix
Replace
#!/bin/bashwith#!/usr/bin/env bashin all scripts./usr/bin/envis available on NixOS (and is the standard portable shebang for bash scripts on non-FHS systems).Environment
/bin/bash)