Merge pull request #3818 from MikeMcQuaid/curl-linux-tweaks

brew.sh: use system curl on Linux where possible.
This commit is contained in:
Mike McQuaid 2018-02-20 11:07:48 +00:00 committed by GitHub
commit 2c84c04bd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,6 @@ case "$HOMEBREW_SYSTEM" in
Linux) HOMEBREW_LINUX="1" ;;
esac
HOMEBREW_CURL="curl"
if [[ -n "$HOMEBREW_MACOS" ]]
then
HOMEBREW_PROCESSOR="$(uname -p)"
@ -107,7 +106,6 @@ else
[[ -n "$HOMEBREW_LINUX" ]] && HOMEBREW_OS_VERSION="$(lsb_release -sd 2>/dev/null)"
: "${HOMEBREW_OS_VERSION:=$(uname -r)}"
HOMEBREW_OS_USER_AGENT_VERSION="$HOMEBREW_OS_VERSION"
HOMEBREW_FORCE_BREWED_CURL=1
if [[ -z "$HOMEBREW_CACHE" ]]
then
@ -125,6 +123,8 @@ if [[ -n "$HOMEBREW_FORCE_BREWED_CURL" &&
"$HOMEBREW_PREFIX/opt/curl/bin/curl" --version >/dev/null
then
HOMEBREW_CURL="$HOMEBREW_PREFIX/opt/curl/bin/curl"
else
HOMEBREW_CURL="curl"
fi
HOMEBREW_USER_AGENT="$HOMEBREW_PRODUCT/$HOMEBREW_USER_AGENT_VERSION ($HOMEBREW_SYSTEM; $HOMEBREW_PROCESSOR $HOMEBREW_OS_USER_AGENT_VERSION)"