diff options
| author | Mike McQuaid | 2018-02-27 10:57:24 +0000 | 
|---|---|---|
| committer | GitHub | 2018-02-27 10:57:24 +0000 | 
| commit | 7b365262ff356a059bb812c9e34478e04095ca06 (patch) | |
| tree | 9998734384212edab3f7fa0da8fe0d75fc896622 | |
| parent | 8ee2d0983c924951f1c66a2464da7f70792127c5 (diff) | |
| parent | 430bb7c3a0688100370272d240891391f3bb915c (diff) | |
| download | brew-7b365262ff356a059bb812c9e34478e04095ca06.tar.bz2 | |
Merge pull request #3843 from MikeMcQuaid/git-too-old-check
update: tweak git too old check.
| -rw-r--r-- | Library/Homebrew/cmd/update.sh | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index cc7a86cf3..3f287340f 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -390,12 +390,14 @@ EOS      brew install curl    fi -  if [[ -n "$HOMEBREW_SYSTEM_GIT_TOO_OLD" ]] || ! git --version >/dev/null 2>&1 +  if ! git --version &>/dev/null || +       [[ -n "$HOMEBREW_SYSTEM_GIT_TOO_OLD" && +        ! -x "$HOMEBREW_PREFIX/opt/git/bin/git" ]]    then      # we cannot install brewed git if homebrew/core is unavailable.      [[ -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] && brew install git      unset GIT_EXECUTABLE -    if ! git --version >/dev/null 2>&1 +    if ! git --version &>/dev/null      then        odie "Git must be installed and in your PATH!"      fi | 
