Shell scripts use non-portable #!/bin/bash shebang
Resolved 💬 3 comments Opened Dec 31, 2025 by rhnvrm Closed Feb 14, 2026
Problem
Several shell scripts in the repository use #!/bin/bash as the shebang, which fails on systems where bash is not at /bin/bash.
Error Example (NixOS)
/bin/sh: .../stop-hook.sh: /bin/bash: bad interpreter: No such file or directory
Affected Systems
- NixOS: bash at
/run/current-system/sw/bin/bash - Guix: non-FHS layout
- Any system without
/bin/bash
Affected Files
Found 13 scripts with #!/bin/bash:
.devcontainer/init-firewall.shplugins/plugin-dev/skills/agent-development/scripts/validate-agent.shplugins/plugin-dev/skills/hook-development/examples/load-context.shplugins/plugin-dev/skills/hook-development/examples/validate-bash.shplugins/plugin-dev/skills/hook-development/examples/validate-write.shplugins/plugin-dev/skills/hook-development/scripts/hook-linter.shplugins/plugin-dev/skills/hook-development/scripts/test-hook.shplugins/plugin-dev/skills/hook-development/scripts/validate-hook-schema.shplugins/plugin-dev/skills/plugin-settings/examples/read-settings-hook.shplugins/plugin-dev/skills/plugin-settings/scripts/parse-frontmatter.shplugins/plugin-dev/skills/plugin-settings/scripts/validate-settings.shplugins/ralph-wiggum/hooks/stop-hook.shplugins/ralph-wiggum/scripts/setup-ralph-loop.sh
Solution
Change shebangs from #!/bin/bash to #!/usr/bin/env bash.
This is the portable POSIX standard that finds bash via PATH, working on NixOS, Guix, macOS, FreeBSD, and standard Linux distributions.
Environment
- OS: NixOS (Linux 6.12.60-cachyos)
- Claude Code Version: current
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗