aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMartin Afanasjew2016-04-06 01:26:12 +0200
committerMartin Afanasjew2016-04-07 08:25:41 +0200
commite747648c53267111691e38f1f53c8951f7baf1b0 (patch)
treeba3a9f5f6bf311c1288e93208afaf4f239a324c0 /Library
parentf016a214702e2462693ca265b750d0641d62bd50 (diff)
downloadbrew-e747648c53267111691e38f1f53c8951f7baf1b0.tar.bz2
always prefer HOMEBREW_CURL over plain 'curl'
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/update.sh2
-rw-r--r--Library/Homebrew/utils/analytics.rb4
-rw-r--r--Library/brew.sh2
3 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index d6ce41b00..8ffd2eadb 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -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" \
diff --git a/Library/Homebrew/utils/analytics.rb b/Library/Homebrew/utils/analytics.rb
index 9995a174f..15de20445 100644
--- a/Library/Homebrew/utils/analytics.rb
+++ b/Library/Homebrew/utils/analytics.rb
@@ -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"]}",
diff --git a/Library/brew.sh b/Library/brew.sh
index 78f42ba3d..7c5d07bf4 100644
--- a/Library/brew.sh
+++ b/Library/brew.sh
@@ -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" \