always prefer HOMEBREW_CURL over plain 'curl'

This commit is contained in:
Martin Afanasjew 2016-04-06 01:26:12 +02:00
parent f016a21470
commit e747648c53
3 changed files with 4 additions and 4 deletions

View File

@ -304,7 +304,7 @@ EOS
UPSTREAM_BRANCH_LOCAL_SHA="$(git rev-parse "refs/remotes/origin/$UPSTREAM_BRANCH")"
# Only try to `git fetch` when the upstream branch is at a different SHA
# (so the API does not return 304: unmodified).
UPSTREAM_SHA_HTTP_CODE="$(curl --silent '--max-time' 3 \
UPSTREAM_SHA_HTTP_CODE="$("$HOMEBREW_CURL" --silent '--max-time' 3 \
--output /dev/null --write-out "%{http_code}" \
--user-agent "$HOMEBREW_USER_AGENT_CURL" \
--header "Accept: application/vnd.github.chitauri-preview+sha" \

View File

@ -16,8 +16,8 @@ def report_analytics(type, metadata={})
# any personally identifiable information.
# https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
# https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters
system "curl", "https://www.google-analytics.com/collect", "-d", "v=1",
"--silent", "--max-time", "3", "--output", "/dev/null",
system ENV["HOMEBREW_CURL"], "https://www.google-analytics.com/collect",
"-d", "v=1", "--silent", "--max-time", "3", "--output", "/dev/null",
"--user-agent", "#{HOMEBREW_USER_AGENT_CURL}",
"-d", "tid=#{ENV["HOMEBREW_ANALYTICS_ID"]}",
"-d", "cid=#{ENV["HOMEBREW_ANALYTICS_USER_UUID"]}",

View File

@ -218,7 +218,7 @@ then
# information.
# https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide#screenView
# https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters
curl https://www.google-analytics.com/collect -d v=1 \
"$HOMEBREW_CURL" https://www.google-analytics.com/collect -d v=1 \
--silent --max-time 3 --output /dev/null \
--user-agent "$HOMEBREW_USER_AGENT_CURL" \
-d tid="$HOMEBREW_ANALYTICS_ID" \