Skip to content

Commit

Permalink
Merge pull request #11896 from iMichka/homepage
Browse files Browse the repository at this point in the history
formula_auditor: use brewed curl for homepage check when needed
  • Loading branch information
iMichka committed Aug 21, 2021
2 parents 653aa4a + bbfa52f commit d14fc2d
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Library/Homebrew/formula_auditor.rb
Expand Up @@ -412,11 +412,21 @@ def audit_homepage

return unless DevelopmentTools.curl_handles_most_https_certificates?

use_homebrew_curl = false
%w[Stable HEAD].each do |name|
spec_name = name.downcase.to_sym
next unless (spec = formula.send(spec_name))

use_homebrew_curl = spec.using == :homebrew_curl
break if use_homebrew_curl
end

if (http_content_problem = curl_check_http_content(homepage,
"homepage URL",
user_agents: [:browser, :default],
check_content: true,
strict: @strict))
user_agents: [:browser, :default],
check_content: true,
strict: @strict,
use_homebrew_curl: use_homebrew_curl))
problem http_content_problem
end
end
Expand Down

0 comments on commit d14fc2d

Please sign in to comment.