Merge pull request #5661 from sjackman/cellar

With symlinked Cellar, don't try to find /usr/local prefix
This commit is contained in:
Shaun Jackman 2019-02-05 00:31:56 -08:00 committed by GitHub
commit 4c03fc0c96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,7 @@ then
fi
# Try to find a /usr/local HOMEBREW_PREFIX where possible (for bottles)
if [[ -L "/usr/local/bin/brew" ]]
if [[ -L "/usr/local/bin/brew" && ! -L "$HOMEBREW_PREFIX/Cellar" ]]
then
USR_LOCAL_BREW_FILE_DIRECTORY="$(symlink_target_directory "/usr/local/bin/brew" "/usr/local/bin")"
USR_LOCAL_HOMEBREW_REPOSITORY="${USR_LOCAL_BREW_FILE_DIRECTORY%/*}"