diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb index 8912abf2fc..cc58ef1262 100644 --- a/Library/Homebrew/system_config.rb +++ b/Library/Homebrew/system_config.rb @@ -130,7 +130,7 @@ module SystemConfig out, = system_command(curl_executable, args: ["--version"], verbose: false) if /^curl (?[\d.]+)/ =~ out - "#{curl_version} => #{curl_executable}" + "#{curl_version} => #{curl_path}" else "N/A" end diff --git a/Library/Homebrew/utils/curl.rb b/Library/Homebrew/utils/curl.rb index 6a3a1d74aa..81ed1a6372 100644 --- a/Library/Homebrew/utils/curl.rb +++ b/Library/Homebrew/utils/curl.rb @@ -22,6 +22,10 @@ module Utils @curl_executable ||= HOMEBREW_SHIMS_PATH/"shared/curl" end + def curl_path + @curl_path ||= Utils.popen_read(curl_executable, "--homebrew=print-path").chomp.presence + end + sig { params( extra_args: T.untyped,