Hook scripts fail on NixOS: hardcoded #!/bin/bash shebang not found
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Start by inspecting the listed .sh files under scripts/ and scripts/legacy/ and verify their current shebangs. Update the affected scripts to use the portable bash shebang, then check that every shell script in those directories no longer references /bin/bash.
Written by the indexing model from the issue text.
Description
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.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.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
- Dominant language
- Shell
- Stars
- 231
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from warpdotdev/claude-code-warp
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
warpdotdev/claude-code-warp#63 · 2 comments ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
warpdotdev/claude-code-warp#61 · 5 comments · 3 reactions ·
All issues in warpdotdev/claude-code-warp
Similar issues
-
docs(agents): strengthen the no-backslash-escaped-backticks rule with an issue-creation example Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
oSoWoSo/vOid_Community_repOsitory#148 · 1 comment ·
-
chore
Difficulty 1/5 Under an hour Newbie friendliness 91/100
alunduil/alunduil-chezmoi#792 ·
-
area: compat bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
zenhub-dev
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenLiberty/ci.docker#747 ·