cmd/update: make curl
respect HOMEBREW_CURLRC
This commit is contained in:
parent
93cac4ccee
commit
cc0f17eb7b
@ -406,6 +406,13 @@ EOS
|
|||||||
QUIET_ARGS=()
|
QUIET_ARGS=()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$HOMEBREW_CURLRC" ]]
|
||||||
|
then
|
||||||
|
CURL_DISABLE_CURLRC_ARGS=(-q)
|
||||||
|
else
|
||||||
|
CURL_DISABLE_CURLRC_ARGS=()
|
||||||
|
fi
|
||||||
|
|
||||||
# only allow one instance of brew update
|
# only allow one instance of brew update
|
||||||
lock update
|
lock update
|
||||||
|
|
||||||
@ -481,7 +488,9 @@ EOS
|
|||||||
GITHUB_API_ENDPOINT="commits/$UPSTREAM_BRANCH_DIR"
|
GITHUB_API_ENDPOINT="commits/$UPSTREAM_BRANCH_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
UPSTREAM_SHA_HTTP_CODE="$("$HOMEBREW_CURL" --silent --max-time 3 \
|
UPSTREAM_SHA_HTTP_CODE="$("$HOMEBREW_CURL" \
|
||||||
|
"${CURL_DISABLE_CURLRC_ARGS[@]}" \
|
||||||
|
--silent --max-time 3 \
|
||||||
--location --output /dev/null --write-out "%{http_code}" \
|
--location --output /dev/null --write-out "%{http_code}" \
|
||||||
--dump-header "$DIR/.git/GITHUB_HEADERS" \
|
--dump-header "$DIR/.git/GITHUB_HEADERS" \
|
||||||
--user-agent "$HOMEBREW_USER_AGENT_CURL" \
|
--user-agent "$HOMEBREW_USER_AGENT_CURL" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user