Update logic that handles HOMEBREW_GIT_PATH.
This commit is contained in:
parent
c3231a4095
commit
2aecfe60fc
@ -351,7 +351,7 @@ else
|
||||
if [[ $(numeric "${curl_name_and_version##* }") -lt $(numeric "$HOMEBREW_MINIMUM_CURL_VERSION") ]]
|
||||
then
|
||||
message="Please update your system cURL.
|
||||
Minimum required version: ${HOMEBREW_MINIMUM_CURL_VERSION}.
|
||||
Minimum required version: ${HOMEBREW_MINIMUM_CURL_VERSION}
|
||||
Your cURL version: ${curl_name_and_version##* }
|
||||
Your cURL executable: $(type -p $HOMEBREW_CURL)"
|
||||
|
||||
@ -376,16 +376,18 @@ Your cURL executable: $(type -p $HOMEBREW_CURL)"
|
||||
IFS=. read -r major minor micro build extra <<< "${git_version_output##* }"
|
||||
if [[ $(numeric "$major.$minor.$micro.$build") -lt $(numeric "$HOMEBREW_MINIMUM_GIT_VERSION") ]]
|
||||
then
|
||||
if [[ -z $HOMEBREW_GIT_PATH ]]; then
|
||||
HOMEBREW_FORCE_BREWED_GIT="1"
|
||||
else
|
||||
odie <<EOS
|
||||
The version of Git that you provided to Homebrew using HOMEBREW_GIT_PATH is too old.
|
||||
message="Please update your system Git.
|
||||
Minimum required version: ${HOMEBREW_MINIMUM_GIT_VERSION}.
|
||||
Your Git version: $major.$minor.$micro.$build.
|
||||
Please point Homebrew to Git ${HOMEBREW_MINIMUM_CURL_VERSION} or newer
|
||||
or unset HOMEBREW_GIT_PATH variable.
|
||||
EOS
|
||||
Your Git version: $major.$minor.$micro.$build
|
||||
Your Git executable: $(unset git && type -p $HOMEBREW_GIT)"
|
||||
if [[ -z $HOMEBREW_GIT_PATH || -z $HOMEBREW_DEVELOPER ]]; then
|
||||
HOMEBREW_FORCE_BREWED_GIT="1"
|
||||
if [[ -z $HOMEBREW_GIT_WARNING ]]; then
|
||||
onoe "$message"
|
||||
HOMEBREW_GIT_WARNING=1
|
||||
fi
|
||||
else
|
||||
odie "$message"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -424,6 +426,7 @@ export HOMEBREW_CURL
|
||||
export HOMEBREW_CURL_WARNING
|
||||
export HOMEBREW_SYSTEM_CURL_TOO_OLD
|
||||
export HOMEBREW_GIT
|
||||
export HOMEBREW_GIT_WARNING
|
||||
export HOMEBREW_MINIMUM_GIT_VERSION
|
||||
export HOMEBREW_PROCESSOR
|
||||
export HOMEBREW_PRODUCT
|
||||
|
||||
@ -373,7 +373,7 @@ EOS
|
||||
! -x "$HOMEBREW_PREFIX/opt/curl/bin/curl" ]]
|
||||
then
|
||||
# we cannot install a Homebrew cURL if homebrew/core is unavailable.
|
||||
if [[ -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] && ! brew install curl
|
||||
if [[ ! -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] || ! brew install curl
|
||||
then
|
||||
odie "Curl must be installed and in your PATH!"
|
||||
fi
|
||||
@ -384,7 +384,7 @@ EOS
|
||||
! -x "$HOMEBREW_PREFIX/opt/git/bin/git" ]]
|
||||
then
|
||||
# we cannot install a Homebrew Git if homebrew/core is unavailable.
|
||||
if [[ -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] && ! brew install git
|
||||
if [[ ! -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] || ! brew install git
|
||||
then
|
||||
odie "Git must be installed and in your PATH!"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user