Skip to content

Conversation

@mantrakp04
Copy link

Summary

  • Change #!/bin/bash to #!/usr/bin/env bash in ralph-wiggum shell scripts
  • Fixes compatibility issues on NixOS, WSL2, and other Linux distributions where /bin/bash may not exist

Test plan

  • Tested setup-ralph-loop.sh --help works on WSL2 Ubuntu
  • Tested setup-ralph-loop.sh "Test task" --max-iterations 3 creates state file correctly
  • Verify scripts work on NixOS

Fixes #12880

🤖 Generated with Claude Code

Change `#!/bin/bash` to `#!/usr/bin/env bash` for portability across
different Linux distributions (NixOS, WSL2, etc.) where /bin/bash may
not exist.

Fixes anthropics#12880

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 7, 2026 04:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the portability of ralph-wiggum shell scripts by updating the shebang to use the env approach for finding bash. This ensures compatibility on systems where bash is not located at /bin/bash, such as NixOS and WSL2.

  • Updated shebang from #!/bin/bash to #!/usr/bin/env bash in ralph-wiggum plugin scripts
  • Fixes compatibility issues on NixOS, WSL2, and other Linux distributions

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
plugins/ralph-wiggum/scripts/setup-ralph-loop.sh Updated shebang to use portable #!/usr/bin/env bash format
plugins/ralph-wiggum/hooks/stop-hook.sh Updated shebang to use portable #!/usr/bin/env bash format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@steveyegge steveyegge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Using #\!/usr/bin/env bash is the correct portable shebang pattern - it finds bash via PATH rather than hardcoding /bin/bash which doesn't exist on NixOS and some other systems.

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.

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

2 participants