From a10b16828ffe244a106e3a049b1114c1897a9ac9 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Mon, 30 May 2022 04:20:53 +0100 Subject: [PATCH] utils/analytics: use curl shim --- Library/Homebrew/utils/analytics.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/utils/analytics.rb b/Library/Homebrew/utils/analytics.rb index 9291c0363d..865570f3aa 100644 --- a/Library/Homebrew/utils/analytics.rb +++ b/Library/Homebrew/utils/analytics.rb @@ -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