ralph-wiggum plugin: Hardcoded /bin/bash shebang breaks on NixOS

Resolved 💬 7 comments Opened Dec 2, 2025 by jacopone Closed Feb 19, 2026

Description

The ralph-wiggum plugin shell scripts use #!/bin/bash shebang which fails on NixOS (and potentially Nix-on-macOS or other non-FHS systems) because bash is not located at /bin/bash.

Error Message

Plugin hook error: /bin/sh: /home/user/.claude/plugins/marketplaces/claude-code-plugins/plugins/ralph-wiggum/hooks/stop-hook.sh: /bin/bash: bad interpreter: No such file or directory

Affected Files

| File | Current | Fix |
|------|---------|-----|
| plugins/ralph-wiggum/hooks/stop-hook.sh | #!/bin/bash | #!/usr/bin/env bash |
| plugins/ralph-wiggum/scripts/setup-ralph-loop.sh | #!/bin/bash | #!/usr/bin/env bash |

Environment

  • OS: NixOS 25.11 (nixos-unstable)
  • Shell: Fish
  • Claude Code: Latest

Root Cause

NixOS follows a non-standard filesystem hierarchy. Only /bin/sh exists; all other binaries (including bash) are in /nix/store/... and accessed via PATH. The portable #!/usr/bin/env bash shebang resolves bash through PATH and works across all Unix-like systems.

Suggested Fix

- #!/bin/bash
+ #!/usr/bin/env bash

This is a one-line change per file and maintains compatibility with all platforms (Linux, macOS, NixOS, BSD, etc.).

Workaround

Users can manually patch the files:

sed -i '1s|#!/bin/bash|#!/usr/bin/env bash|' \
  ~/.claude/plugins/marketplaces/claude-code-plugins/plugins/ralph-wiggum/hooks/stop-hook.sh \
  ~/.claude/plugins/marketplaces/claude-code-plugins/plugins/ralph-wiggum/scripts/setup-ralph-loop.sh

Note: This workaround is reset when the plugin updates.

View original on GitHub ↗

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