system_config: don't print path to curl shim

See discussion at #12191.
This commit is contained in:
Carlo Cabrera 2021-10-06 23:58:04 +08:00
parent 92749f9c52
commit 7dabb465b3
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0
2 changed files with 5 additions and 1 deletions

View File

@ -130,7 +130,7 @@ module SystemConfig
out, = system_command(curl_executable, args: ["--version"], verbose: false) out, = system_command(curl_executable, args: ["--version"], verbose: false)
if /^curl (?<curl_version>[\d.]+)/ =~ out if /^curl (?<curl_version>[\d.]+)/ =~ out
"#{curl_version} => #{curl_executable}" "#{curl_version} => #{curl_path}"
else else
"N/A" "N/A"
end end

View File

@ -22,6 +22,10 @@ module Utils
@curl_executable ||= HOMEBREW_SHIMS_PATH/"shared/curl" @curl_executable ||= HOMEBREW_SHIMS_PATH/"shared/curl"
end end
def curl_path
@curl_path ||= Utils.popen_read(curl_executable, "--homebrew=print-path").chomp.presence
end
sig { sig {
params( params(
extra_args: T.untyped, extra_args: T.untyped,