diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index d0b15e080f..16df41f478 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -350,17 +350,23 @@ 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="Your cURL version is too old. +Minimum required version: ${HOMEBREW_MINIMUM_CURL_VERSION} +Your cURL version: ${curl_name_and_version##* } +Your cURL executable: $(type -p $HOMEBREW_CURL) +To point Homebrew to cURL ${HOMEBREW_MINIMUM_CURL_VERSION} or newer, +enable developer mode by setting HOMEBREW_DEVELOPER to 1, +then set HOMEBREW_CURL_PATH to the location of cURL executable." + + 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 || @@ -380,7 +381,11 @@ EOS ! -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 + if [[ -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] + then + ohai "Installing Homebrew Git" + brew install git || odie "Failed to install Git" + fi unset GIT_EXECUTABLE if ! git --version &>/dev/null then