aboutsummaryrefslogtreecommitdiffstats
path: root/Library/brew.sh
diff options
context:
space:
mode:
authorXu Cheng2016-05-03 16:01:42 +0800
committerXu Cheng2016-07-11 21:12:56 +0800
commita35e3f1fc183af98451f92eda2c5e42c328e36ba (patch)
tree06e9014fb09a315e3657b44b1708526abc372bf6 /Library/brew.sh
parent8f178187c0910864c9d811ed00ca93f0ad208d55 (diff)
downloadbrew-a35e3f1fc183af98451f92eda2c5e42c328e36ba.tar.bz2
add vendor-install command
Diffstat (limited to 'Library/brew.sh')
-rw-r--r--Library/brew.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/brew.sh b/Library/brew.sh
index 66858a737..c1606a4ff 100644
--- a/Library/brew.sh
+++ b/Library/brew.sh
@@ -116,6 +116,11 @@ HOMEBREW_USER_AGENT="$HOMEBREW_PRODUCT/$HOMEBREW_VERSION ($HOMEBREW_SYSTEM; $HOM
HOMEBREW_CURL_VERSION="$("$HOMEBREW_CURL" --version 2>/dev/null | head -n1 | /usr/bin/awk '{print $1"/"$2}')"
HOMEBREW_USER_AGENT_CURL="$HOMEBREW_USER_AGENT $HOMEBREW_CURL_VERSION"
+if [[ -z "$HOMEBREW_CACHE" ]]
+then
+ HOMEBREW_CACHE="$HOME/Library/Caches/Homebrew"
+fi
+
# Declared in bin/brew
export HOMEBREW_BREW_FILE
export HOMEBREW_PREFIX
@@ -124,6 +129,7 @@ export HOMEBREW_LIBRARY
# Declared in brew.sh
export HOMEBREW_VERSION
+export HOMEBREW_CACHE
export HOMEBREW_CELLAR
export HOMEBREW_RUBY_PATH
export HOMEBREW_SYSTEM
@@ -212,7 +218,7 @@ fi
if [[ "$(id -u)" = "0" && "$(/usr/bin/stat -f%u "$HOMEBREW_BREW_FILE")" != "0" ]]
then
case "$HOMEBREW_COMMAND" in
- analytics|install|reinstall|postinstall|link|pin|update|upgrade|create|migrate|tap|tap-pin|switch)
+ analytics|install|reinstall|postinstall|link|pin|update|upgrade|vendor-install|create|migrate|tap|tap-pin|switch)
odie <<EOS
Cowardly refusing to 'sudo brew $HOMEBREW_COMMAND'
You can use brew with sudo, but only if the brew executable is owned by root.