Skip to content
Snippets Groups Projects
Commit 1284f295 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

audit: don't try to HTTP check non-HTTP content.

parent b984be67
No related branches found
No related tags found
No related merge requests found
......@@ -175,6 +175,8 @@ class FormulaAuditor
end
def self.check_http_content(url, user_agents: [:default])
return unless url.start_with? "http"
details = nil
user_agent = nil
user_agents.each do |ua|
......
......@@ -419,9 +419,8 @@ class FormulaAuditorTests < Homebrew::TestCase
EOS
fa.audit_homepage
assert_equal ["The homepage should start with http or https " \
"(URL is #{fa.formula.homepage}).", "The homepage #{fa.formula.homepage} is not reachable " \
"(HTTP status code 000)"], fa.problems
assert_equal ["The homepage should start with http or https (URL is #{fa.formula.homepage})."],
fa.problems
formula_homepages = {
"bar" => "http://www.freedesktop.org/wiki/bar",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment