[BUG] Installation creates FreeBSD-incompatible shebang in wrapper script

Resolved 💬 3 comments Opened Oct 8, 2025 by hagan Closed Jan 7, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When installing claude-code via npm update on FreeBSD, the wrapper script at ~/.claude/local/claude is created with
#!/bin/bash, which doesn't exist on FreeBSD (bash is at /usr/local/bin/bash).

Expected: Use #!/usr/bin/env bash for cross-platform compatibility
Actual: Hardcoded #!/bin/bash
Version: 2.0.10
OS: FreeBSD 14.3

This breaks claude after running npm update @anthropic-ai/claude-code as recommended by claude doctor.

What Should Happen?

Expect claude to load, instead get bad interpreter: /bin/bash: no such file or directory

Error Messages/Logs

zsh: /home/username/.claude/local/claude: bad interpreter: /bin/bash: no such file or directory

Steps to Reproduce

Just running claude on a FreeBSD system, probably of any release. Scripts assumed location is incorrect

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.10 (Claude Code)

Platform

Anthropic API

Operating System

Other

Terminal/Shell

Terminal.app (macOS)

Additional Information

Changing the shell path to /usr/local/bin/bash fixes it

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗