Question Details

No question body available.

Tags

bash shell segmentation-fault

Answers (2)

July 12, 2025 Score: 1 Rep: 729 Quality: Low Completeness: 30%

I was having this exact same problem on a Macbook Pro m4, however it was a big deal for me since I do heavy use of direnv and it was completely unusable (bash is used by direnv to load its stdlib, and was segfaulting).

Updating to latest macOS version (Sequoia 15.5 from 14.X) solved the problem for me.

Reference: https://github.com/orgs/Homebrew/discussions/6270

April 11, 2025 Score: -1 Rep: 1 Quality: Low Completeness: 10%

this line might return null

echo "SOURCE: ${BASHSOURCE%/*}"

so you could do

DIR="$(cd "$(dirname "${BASHSOURCE[0]}")" && pwd)"

echo "$DIR"

instead