aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-10-11 09:37:37 +0100
committerMike McQuaid2016-10-11 09:37:37 +0100
commit981cac2a2e8795b92454e73fd48eb9f530a50c28 (patch)
tree44575c4e33503692e71151833dac94123758bf1e /Library
parent6be6ce33e0e5967f8e67801875bff6ab3f99b1ef (diff)
downloadbrew-981cac2a2e8795b92454e73fd48eb9f530a50c28.tar.bz2
brew.sh: warn on $HOMEBREW_REPOSITORY/Cellar
If you’re using a /usr/local prefix but e.g. /usr/local/homebrew/Cellar then you’ll miss out on most binary packages for no good reason so warn people of that.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh
index 55d75511c..923dd4fd8 100644
--- a/Library/Homebrew/brew.sh
+++ b/Library/Homebrew/brew.sh
@@ -277,6 +277,18 @@ EOS
}
check-run-command-as-root
+if [[ "$HOMEBREW_PREFIX" = "/usr/local" &&
+ "$HOMEBREW_CELLAR" = "$HOMEBREW_REPOSITORY/Cellar" ]]
+then
+ cat >&2 <<EOS
+Warning: your HOMEBREW_PREFIX is set to /usr/local but HOMEBREW_CELLAR is set
+to $HOMEBREW_CELLAR. Your current HOMEBREW_CELLAR location will stop
+you being able to use all the binary packages (bottles) Homebrew provides. We
+recommend you move your HOMEBREW_CELLAR to /usr/local/Cellar which will get you
+access to all bottles."
+EOS
+fi
+
# Hide shellcheck complaint:
# shellcheck source=/dev/null
source "$HOMEBREW_LIBRARY/Homebrew/utils/analytics.sh"