cmd/update.sh: update Git logic.

Co-authored-by: Maxim Belkin <maxim.belkin@gmail.com>
This commit is contained in:
Mike McQuaid 2020-11-25 08:44:40 +00:00 committed by GitHub
parent 82ad6a56e9
commit fd08ffdd67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -383,9 +383,7 @@ EOS
! -x "$HOMEBREW_PREFIX/opt/git/bin/git" ]]
then
ohai "Installing Homebrew Git"
[[ -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] && brew install git
unset GIT_EXECUTABLE
if ! git --version &>/dev/null
if [[ -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] && ! brew install git
then
odie "Git must be installed and in your PATH!"
fi