aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMisty De Meo2014-02-21 15:43:32 -0800
committerMisty De Meo2014-02-21 20:54:23 -0800
commit3477c88532fc9e7848d172772f32a07112f4de1d (patch)
tree798519b46cf7fb480d2864d735986b4353ca689e /bin
parentc44fb1b78c945c71854b669e6bcfbf5eb5a45724 (diff)
downloadhomebrew-3477c88532fc9e7848d172772f32a07112f4de1d.tar.bz2
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.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/brew b/bin/brew
index 027640677..fd2d7108d 100755
--- a/bin/brew
+++ b/bin/brew
@@ -15,6 +15,11 @@ fi
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:]")
if [ "$BREW_SYSTEM" = "darwin" ]
then