Unset GEM_HOME and GEM_PATH before running brew.rb

This was reported in Tigerbrew, but is a worthwhile fix everywhere.

Fixes mistydemeo/tigerbrew#177.
This commit is contained in:
Misty De Meo 2014-02-21 15:43:32 -08:00
parent e3e14a0cdf
commit 5a7a5c3eae

View File

@ -15,6 +15,11 @@ fi
BREW_LIBRARY_DIRECTORY=$(cd "$BREW_FILE_DIRECTORY"/../Library && pwd -P) BREW_LIBRARY_DIRECTORY=$(cd "$BREW_FILE_DIRECTORY"/../Library && pwd -P)
# Users may have these set, pointing the system Ruby
# at non-system gem paths
unset GEM_HOME
unset GEM_PATH
BREW_SYSTEM=$(uname -s | tr "[:upper:]" "[:lower:]") BREW_SYSTEM=$(uname -s | tr "[:upper:]" "[:lower:]")
if [ "$BREW_SYSTEM" = "darwin" ] if [ "$BREW_SYSTEM" = "darwin" ]
then then