diff options
| author | Mike McQuaid | 2016-09-19 14:56:59 +0100 |
|---|---|---|
| committer | GitHub | 2016-09-19 14:56:59 +0100 |
| commit | 7ed7e3cd1a22a258ab8336b1f34b258ab8774e04 (patch) | |
| tree | a8ebd801da62dc6ed5ce138dbf89ead770215632 /Library/Homebrew | |
| parent | b0f3e38ff94b3340252e986d6e38f4b21d17985b (diff) | |
| parent | c30665afa62c4f8fc8d776f121967dc6d6bf1ba7 (diff) | |
| download | brew-7ed7e3cd1a22a258ab8336b1f34b258ab8774e04.tar.bz2 | |
Merge pull request #1026 from MikeMcQuaid/migration-auto-update-fix
brew.sh: fix repository auto-update change.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/brew.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 0fadecaba..d33cc8678 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -268,6 +268,17 @@ update-preinstall() { brew update --preinstall fi + # If brew update --preinstall did a migration then export the new locations. + if [[ "$HOMEBREW_REPOSITORY" = "/usr/local" && + ! -d "$HOMEBREW_REPOSITORY/.git" && + -d "/usr/local/Homebrew/.git" ]] + then + HOMEBREW_REPOSITORY="/usr/local/Homebrew" + HOMEBREW_LIBRARY="$HOMEBREW_REPOSITORY/Library" + export HOMEBREW_REPOSITORY + export HOMEBREW_LIBRARY + fi + # If we've checked for updates, we don't need to check again. export HOMEBREW_NO_AUTO_UPDATE="1" } |
