aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-08-08 09:55:23 +0100
committerMike McQuaid2016-08-09 19:41:30 +0100
commit222b73041583840f85b012cddb17b216a8a301d5 (patch)
tree101d5945993774c415f767ca66bb28f6e2481082 /Library
parent2b8ea07979da10a5edba2620a86d8111c9d2fee6 (diff)
downloadbrew-222b73041583840f85b012cddb17b216a8a301d5.tar.bz2
analytics.*: output curl command in debug mode.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/utils/analytics.rb6
-rw-r--r--Library/Homebrew/utils/analytics.sh2
2 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/utils/analytics.rb b/Library/Homebrew/utils/analytics.rb
index 10cf2affa..087c69540 100644
--- a/Library/Homebrew/utils/analytics.rb
+++ b/Library/Homebrew/utils/analytics.rb
@@ -31,9 +31,9 @@ module Utils
# https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
# https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters
if ENV["HOMEBREW_ANALYTICS_DEBUG"]
- puts Utils.popen_read ENV["HOMEBREW_CURL"],
- "https://www.google-analytics.com/debug/collect",
- *args
+ url = "https://www.google-analytics.com/debug/collect"
+ puts "#{ENV["HOMEBREW_CURL"]} #{url} #{args.join(" ")}"
+ puts Utils.popen_read ENV["HOMEBREW_CURL"], url, *args
else
pid = fork do
exec ENV["HOMEBREW_CURL"],
diff --git a/Library/Homebrew/utils/analytics.sh b/Library/Homebrew/utils/analytics.sh
index 4503ac2f6..3063716d7 100644
--- a/Library/Homebrew/utils/analytics.sh
+++ b/Library/Homebrew/utils/analytics.sh
@@ -113,6 +113,8 @@ report-analytics-screenview-command() {
"${args[@]}" \
--silent --output /dev/null &>/dev/null & disown
else
+ echo "$HOMEBREW_CURL https://www.google-analytics.com/debug/collect" \
+ "${args[@]}"
"$HOMEBREW_CURL" https://www.google-analytics.com/debug/collect \
"${args[@]}"
fi