aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDoug Hazell2017-02-12 15:26:59 +0000
committerDoug Hazell2017-02-12 15:26:59 +0000
commitadc43466a6c3d807344e0350e8d1776c4bd78a31 (patch)
tree692cffed37350808290c564bcf240ddee3a7b897 /Library
parent0bb0228962cebcce05ab966618945621ba144fcb (diff)
downloadbrew-adc43466a6c3d807344e0350e8d1776c4bd78a31.tar.bz2
Reverting 'brew.sh' to origin/master to resolve conflict
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh
index e93d3de75..81a52f474 100644
--- a/Library/Homebrew/brew.sh
+++ b/Library/Homebrew/brew.sh
@@ -73,6 +73,18 @@ fi
export GEM_OLD_HOME="$GEM_HOME"
export GEM_OLD_PATH="$GEM_PATH"
+# Users may have these set, pointing the system Ruby
+# at non-system gem paths
+unset GEM_HOME
+unset GEM_PATH
+
+# Users may have this set, injecting arbitrary environment changes into
+# bash processes inside builds
+unset BASH_ENV
+
+# Users may have this set, breaking grep's output.
+unset GREP_OPTIONS
+
HOMEBREW_SYSTEM="$(uname -s)"
case "$HOMEBREW_SYSTEM" in
Darwin) HOMEBREW_MACOS="1" ;;
@@ -327,7 +339,7 @@ else
# shellcheck source=/dev/null
source "$HOMEBREW_LIBRARY/Homebrew/utils/ruby.sh"
setup-ruby-path
-
+
# Unshift command back into argument list (unless argument list was empty).
[[ "$HOMEBREW_ARG_COUNT" -gt 0 ]] && set -- "$HOMEBREW_COMMAND" "$@"
{ update-preinstall; exec "$HOMEBREW_RUBY_PATH" -W0 "$HOMEBREW_LIBRARY/Homebrew/brew.rb" "$@"; }