diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index c9d64f1c04..15eecbc5ad 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -357,17 +357,20 @@ else curl_name_and_version="${curl_version_output%% (*}" if [[ $(numeric "${curl_name_and_version##* }") -lt $(numeric "$HOMEBREW_MINIMUM_CURL_VERSION") ]] then - if [[ -z $HOMEBREW_CURL_PATH ]]; then + message="Please update your system cURL. +Minimum required version: ${HOMEBREW_MINIMUM_CURL_VERSION} +Your cURL version: ${curl_name_and_version##* } +Your cURL executable: $(type -p $HOMEBREW_CURL)" + + if [[ -z $HOMEBREW_CURL_PATH || -z $HOMEBREW_DEVELOPER ]]; then HOMEBREW_SYSTEM_CURL_TOO_OLD=1 HOMEBREW_FORCE_BREWED_CURL=1 + if [[ -z $HOMEBREW_CURL_WARNING ]]; then + onoe "$message" + HOMEBREW_CURL_WARNING=1 + fi else - odie </dev/null || [[ -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 - unset GIT_EXECUTABLE - if ! git --version &>/dev/null + # we cannot install a Homebrew Git if homebrew/core is unavailable. + if [[ ! -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] || ! brew install git then odie "Git must be installed and in your PATH!" fi fi + export GIT_TERMINAL_PROMPT="0" export GIT_SSH_COMMAND="ssh -oBatchMode=yes"