Hook scripts shipped with CRLF line endings → "/bin/bash^M: bad interpreter" on macOS/Linux
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start with the 14 shell files listed under scripts/ and scripts/legacy/, then check whether the repository has a .gitattributes file. Verify the current terminators with file or od, convert the scripts to LF, and add the stated attribute if needed. Done means all shipped .sh files use LF and their shebangs no longer produce the /bin/bash^M failure on macOS/Linux.
Written by the indexing model from the issue text.
Description
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.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/*.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:
warpv2.1.0 - OS: macOS (darwin, arm64); same failure mode applies to any Linux host
Suggested fix
-
Re-commit all
*.shwith LF line endings. -
Add a
.gitattributesto keep them LF regardless of contributor platform /core.autocrlf:*.sh text eol=lf
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$//'
- 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 1/5 1-3 hours Newbie friendliness 88/100
warpdotdev/claude-code-warp#61 · 5 comments · 3 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
warpdotdev/claude-code-warp#60 · 1 comment ·
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 ·