Fixes Ruby PATH bug on macOS Homebrew

This commit is contained in:
Brian Zalewski 2023-11-27 17:18:34 +00:00
parent c8aaaafe40
commit a95c7795e3

View file

@ -389,7 +389,11 @@ export RIPGREP_CONFIG_PATH="${XDG_CONFIG_HOME:-$HOME/.config}/ripgrep/config"
### Ruby
# Add Homebrew Ruby install location to PATH (for macOS and tools that require a more recent version than the bundled system version)
if [ -d /usr/local/opt/ruby/bin ]; then
export PATH="/usr/local/opt/ruby/bin:$PATH"
elif [ -d "${HOMEBREW_PREFIX:-/opt/homebrew}/opt/ruby/bin" ]; then
export PATH="${HOMEBREW_PREFIX:-/opt/homebrew}/opt/ruby/bin:$PATH"
fi
export GEM_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/gems"
export PATH="$PATH:$GEM_HOME/bin"