Skip to content

Conversation

@rhnvrm
Copy link

@rhnvrm rhnvrm commented Dec 31, 2025

Fixes #12880
Fixes #15876

Summary

Change all 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.

Changes

Updated 13 shell scripts across:

  • .devcontainer/init-firewall.sh
  • plugins/plugin-dev/skills/*/scripts/*.sh
  • plugins/plugin-dev/skills/*/examples/*.sh
  • plugins/ralph-wiggum/hooks/stop-hook.sh
  • plugins/ralph-wiggum/scripts/setup-ralph-loop.sh

Also updated hook-linter.sh to recommend the portable shebang in its error message.

Testing

Tested locally on NixOS - all scripts now work correctly.

The hardcoded #!/bin/bash shebang fails on NixOS and other systems
where bash is not located at /bin/bash (e.g., NixOS has bash at
/run/current-system/sw/bin/bash).

Using #!/usr/bin/env bash is the portable POSIX standard that finds
bash via PATH, working across NixOS, Guix, macOS, FreeBSD, and
standard Linux distributions.

Files updated:
- .devcontainer/init-firewall.sh
- plugins/plugin-dev/skills/*/scripts/*.sh
- plugins/plugin-dev/skills/*/examples/*.sh
- plugins/ralph-wiggum/hooks/stop-hook.sh
- plugins/ralph-wiggum/scripts/setup-ralph-loop.sh

Also updated hook-linter.sh to recommend the portable shebang.
@rhnvrm
Copy link
Author

rhnvrm commented Jan 5, 2026

@amorriscode sorry for the ping, but I just saw that you updated the ralph plugin, would be great to get this PR reviewed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shell scripts use non-portable #!/bin/bash shebang ralph-wiggum plugin: Hardcoded /bin/bash shebang breaks on NixOS

1 participant