fix(ralph-loop): use env bash shebang for macOS compatibility #366
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
#!/bin/bashto#!/usr/bin/env bashinsetup-ralph-loop.shandstop-hook.sh/bin/bashis Bash 3.2 (GPLv2), which treats empty arrays as "unbound variable" underset -uProblem
macOS ships with Bash 3.2.57 at
/bin/bash(Apple refuses to ship GPLv3-licensed Bash 4+). This version has a known bug:setup-ralph-loop.shline 113 hits this exact issue whenPROMPT_PARTSis empty, causing:Fix
Using
#!/usr/bin/env bashresolves the PATH to a modern Bash (e.g. Homebrew's Bash 5.x) when available. This is consistent with the approach already used byexplanatory-output-styleandlearning-output-stylehooks in this repo.Test plan
setup-ralph-loop.shwith no arguments: shows proper error message instead of crashingsetup-ralph-loop.shwith arguments: activates loop correctly/bin/bashis already 5.x)🤖 Generated with Claude Code