Simplify check before git install

No need to check for both variables, because they're always set together.
Also, this harmonizes with the CURL equivalent just above.
This commit is contained in:
Jack Haden-Enneking 2018-06-26 11:14:32 -07:00 committed by GitHub
parent 596f29aa40
commit e63feb79f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -384,9 +384,8 @@ EOS
fi
if ! git --version &>/dev/null ||
[[ ( -n "$HOMEBREW_SYSTEM_GIT_TOO_OLD" ||
-n "$HOMEBREW_FORCE_BREWED_GIT" ) &&
! -x "$HOMEBREW_PREFIX/opt/git/bin/git" ]]
[[ -n "$HOMEBREW_FORCE_BREWED_GIT" &&
! -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