diff options
| author | Mike McQuaid | 2017-11-04 16:30:54 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2017-11-05 14:45:36 +0000 |
| commit | f999a57620d761065415bcd2d2a4141208a96eb9 (patch) | |
| tree | df55f49cf9bfc5559c9547cf895e09660d259ae2 /Library | |
| parent | c3006f0f121b44baa7acb5e2a023dfd96e582e7a (diff) | |
| download | brew-f999a57620d761065415bcd2d2a4141208a96eb9.tar.bz2 | |
brew.sh: cleanup some environment pollution.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/brew.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 241fa1c2e..1e2b0f3ed 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -69,9 +69,15 @@ then odie "Cowardly refusing to continue at this prefix: $HOMEBREW_PREFIX" fi -# Save value to use for installing gems -export HOMEBREW_GEM_HOME="$GEM_HOME" -export HOMEBREW_GEM_PATH="$GEM_PATH" +# Save values to use for installing gems +if [[ -n "$GEM_HOME" ]] +then + export HOMEBREW_GEM_HOME="$GEM_HOME" +fi +if [[ -n "$GEM_PATH" ]] +then + export HOMEBREW_GEM_PATH="$GEM_PATH" +fi # Users may have these set, pointing the system Ruby # at non-system gem paths @@ -308,9 +314,6 @@ update-preinstall() { [[ -z "$HOMEBREW_NO_AUTO_UPDATE" ]] || return [[ -z "$HOMEBREW_UPDATE_PREINSTALL" ]] || return - # Allow auto-update migration now we have a fix in place (below in this function). - export HOMEBREW_ENABLE_AUTO_UPDATE_MIGRATION="1" - if [[ "$HOMEBREW_COMMAND" = "install" || "$HOMEBREW_COMMAND" = "upgrade" || "$HOMEBREW_COMMAND" = "tap" ]] then if [[ -z "$HOMEBREW_VERBOSE" ]] @@ -319,6 +322,9 @@ update-preinstall() { timer_pid=$! fi + # Allow auto-update migration now we have a fix in place (below in this function). + export HOMEBREW_ENABLE_AUTO_UPDATE_MIGRATION="1" + brew update --preinstall if [[ -n "$timer_pid" ]] |
