utils/analytics: use curl shim
This commit is contained in:
parent
0a1762bd14
commit
a10b16828f
@ -47,18 +47,19 @@ module Utils
|
||||
args << "--data" << "#{key}=#{value}"
|
||||
end
|
||||
|
||||
curl = Utils::Curl.curl_executable
|
||||
|
||||
# Send analytics. Don't send or store any personally identifiable information.
|
||||
# https://docs.brew.sh/Analytics
|
||||
# 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"]
|
||||
url = "https://www.google-analytics.com/debug/collect"
|
||||
puts "#{ENV["HOMEBREW_CURL"]} #{args.join(" ")} #{url}"
|
||||
puts Utils.popen_read ENV["HOMEBREW_CURL"], *args, url
|
||||
puts "#{curl} #{args.join(" ")} #{url}"
|
||||
puts Utils.popen_read(curl, *args, url)
|
||||
else
|
||||
pid = fork do
|
||||
exec ENV["HOMEBREW_CURL"],
|
||||
*args,
|
||||
exec curl, *args,
|
||||
"--silent", "--output", "/dev/null",
|
||||
"https://www.google-analytics.com/collect"
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user