From 222b73041583840f85b012cddb17b216a8a301d5 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 8 Aug 2016 09:55:23 +0100 Subject: [PATCH] analytics.*: output curl command in debug mode. --- Library/Homebrew/utils/analytics.rb | 6 +++--- Library/Homebrew/utils/analytics.sh | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/utils/analytics.rb b/Library/Homebrew/utils/analytics.rb index 10cf2affa4..087c695400 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 4503ac2f6b..3063716d71 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