Merge pull request #12198 from carlocab/config-curl-path

This commit is contained in:
Carlo Cabrera 2021-10-07 00:18:50 +08:00 committed by GitHub
commit 4d5af40662
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
if /^curl (?<curl_version>[\d.]+)/ =~ out
"#{curl_version} => #{curl_executable}"
"#{curl_version} => #{curl_path}"
else
"N/A"
end

View File

@ -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,