From 6455264716eac611bfbd9caf71a7bf5dc21498f9 Mon Sep 17 00:00:00 2001 From: Maxim Belkin Date: Mon, 11 May 2020 07:20:16 -0500 Subject: [PATCH] brew.sh: stop if HOMEBREW_GIT_PATH is too old --- Library/Homebrew/brew.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 73e4c1312b..73f59ffbff 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -194,7 +194,7 @@ else The version of cURL that you provided to Homebrew using HOMEBREW_CURL_PATH is too old. Minimum required version: ${HOMEBREW_MINIMUM_CURL_VERSION}. Your cURL version: ${curl_name_and_version##* }. -Please point Homebrew to cURL version ${HOMEBREW_MINIMUM_CURL_VERSION} or newer +Please point Homebrew to cURL ${HOMEBREW_MINIMUM_CURL_VERSION} or newer or unset HOMEBREW_CURL_PATH variable. EOS fi @@ -209,7 +209,17 @@ EOS IFS=. read -r major minor micro build extra <<< "${git_version_output##* }" if [[ $(numeric "$major.$minor.$micro.$build") -lt $(numeric "$HOMEBREW_MINIMUM_GIT_VERSION") ]] then - HOMEBREW_FORCE_BREWED_GIT="1" + if [[ -z $HOMEBREW_GIT_PATH ]]; then + HOMEBREW_FORCE_BREWED_GIT="1" + else + odie <