Merge pull request #13126 from EricFromCanada/bump-repology-check
bump: resume checking for TLS 1.3 support
This commit is contained in:
commit
8ba4674ed2
@ -59,12 +59,14 @@ module Homebrew
|
||||
|
||||
limit = args.limit.to_i if args.limit.present?
|
||||
|
||||
begin
|
||||
unless Pathname.new(ENV["HOMEBREW_BREWED_CURL_PATH"]).exist?
|
||||
ensure_formula_installed!("curl", reason: "Repology queries")
|
||||
unless Utils::Curl.curl_supports_tls13?
|
||||
begin
|
||||
unless Pathname.new(ENV["HOMEBREW_BREWED_CURL_PATH"]).exist?
|
||||
ensure_formula_installed!("curl", reason: "Repology queries")
|
||||
end
|
||||
rescue FormulaUnavailableError
|
||||
opoo "A newer `curl` is required for Repology queries."
|
||||
end
|
||||
rescue FormulaUnavailableError
|
||||
opoo "A newer `curl` is required for Repology queries."
|
||||
end
|
||||
|
||||
if formulae_and_casks.present?
|
||||
|
@ -19,7 +19,7 @@ module Repology
|
||||
last_package_in_response += "/" if last_package_in_response.present?
|
||||
url = "https://repology.org/api/v1/projects/#{last_package_in_response}?inrepo=#{repository}&outdated=1"
|
||||
|
||||
output, errors, = curl_output(url.to_s, "--silent", use_homebrew_curl: false)
|
||||
output, errors, = curl_output(url.to_s, "--silent", use_homebrew_curl: !curl_supports_tls13?)
|
||||
JSON.parse(output)
|
||||
rescue
|
||||
if Homebrew::EnvConfig.developer?
|
||||
@ -35,7 +35,7 @@ module Repology
|
||||
url = "https://repology.org/tools/project-by?repo=#{repository}&" \
|
||||
"name_type=srcname&target_page=api_v1_project&name=#{name}"
|
||||
|
||||
output, errors, = curl_output("--location", "--silent", url.to_s, use_homebrew_curl: true)
|
||||
output, errors, = curl_output("--location", "--silent", url.to_s, use_homebrew_curl: !curl_supports_tls13?)
|
||||
|
||||
data = JSON.parse(output)
|
||||
{ name => data }
|
||||
|
Loading…
x
Reference in New Issue
Block a user