From a19d0708a4888f42d8e5d1ff082a7a5aed73279e Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 26 Nov 2017 18:17:25 +0000 Subject: Allow optionally using Homebrew's curl If `HOMEBREW_FORCE_BREWED_CURL` is set then allow it to be used instead of the system `curl`. --- Library/Homebrew/cmd/update.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 3507fa92b..609e4094a 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -383,14 +383,15 @@ user account: EOS fi + # we may want to use a Homebrew curl + if [[ -n "$HOMEBREW_FORCE_BREWED_CURL" && + ! -x "$HOMEBREW_PREFIX/opt/curl/bin/curl" ]] + then + brew install curl + fi + if ! git --version >/dev/null 2>&1 then - # we need a new enough curl to install git - if [[ -n "$HOMEBREW_SYSTEM_CURL_TOO_OLD" && - ! -x "$HOMEBREW_PREFIX/opt/curl/bin/curl" ]] - then - brew install curl - fi # we cannot install brewed git if homebrew/core is unavailable. [[ -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] && brew install git unset GIT_EXECUTABLE -- cgit v1.2.3