Summary
All shell scripts in the warp plugin (v2.1.0) are shipped with Windows CRLF (\r\n) line endings. On macOS/Linux the carriage return becomes part of the shebang, so the OS looks for an interpreter literally named /bin/bash\r and the hook fails:
Failed with non-blocking status code: /bin/sh:
/Users/<me>/.claude/plugins/cache/claude-code-warp/warp/2.1.0/scripts/on-post-tool-use.sh: /bin/bash^M: bad interpreter: No such file or directory
Affected files
Every .sh in scripts/ and scripts/legacy/ (14 files) has CRLF terminators, e.g.:
scripts/on-post-tool-use.sh
scripts/on-notification.sh
scripts/on-permission-request.sh
scripts/on-prompt-submit.sh
scripts/on-session-start.sh
scripts/on-stop.sh
scripts/warp-notify.sh
scripts/build-payload.sh
scripts/emit-terminal-sequence.sh
scripts/should-use-structured.sh
scripts/legacy/*.sh
Confirmed via:
$ file scripts/on-post-tool-use.sh
... Bourne-Again shell script text executable, ASCII text, with CRLF line terminators
$ head -1 scripts/on-post-tool-use.sh | od -c
0000000 # ! / b i n / b a s h \r \n
Environment
- Plugin:
warp v2.1.0
- OS: macOS (darwin, arm64); same failure mode applies to any Linux host
Suggested fix
-
Re-commit all *.sh with LF line endings.
-
Add a .gitattributes to keep them LF regardless of contributor platform / core.autocrlf:
Workaround
Strip the carriage returns locally (reverts on plugin reinstall):
find ~/.claude/plugins/cache/claude-code-warp -name '*.sh' -print0 | xargs -0 perl -i -pe 's/\r$//'
Summary
All shell scripts in the
warpplugin (v2.1.0) are shipped with Windows CRLF (\r\n) line endings. On macOS/Linux the carriage return becomes part of the shebang, so the OS looks for an interpreter literally named/bin/bash\rand the hook fails:Affected files
Every
.shinscripts/andscripts/legacy/(14 files) has CRLF terminators, e.g.:scripts/on-post-tool-use.shscripts/on-notification.shscripts/on-permission-request.shscripts/on-prompt-submit.shscripts/on-session-start.shscripts/on-stop.shscripts/warp-notify.shscripts/build-payload.shscripts/emit-terminal-sequence.shscripts/should-use-structured.shscripts/legacy/*.shConfirmed via:
Environment
warpv2.1.0Suggested fix
Re-commit all
*.shwith LF line endings.Add a
.gitattributesto keep them LF regardless of contributor platform /core.autocrlf:Workaround
Strip the carriage returns locally (reverts on plugin reinstall):