diff options
| author | Xu Cheng | 2016-05-03 16:01:42 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-07-11 21:12:56 +0800 |
| commit | a35e3f1fc183af98451f92eda2c5e42c328e36ba (patch) | |
| tree | 06e9014fb09a315e3657b44b1708526abc372bf6 /Library/brew.sh | |
| parent | 8f178187c0910864c9d811ed00ca93f0ad208d55 (diff) | |
| download | brew-a35e3f1fc183af98451f92eda2c5e42c328e36ba.tar.bz2 | |
add vendor-install command
Diffstat (limited to 'Library/brew.sh')
| -rw-r--r-- | Library/brew.sh | 8 |
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. |
