diff options
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/audit_test.rb | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index cf5bdcdc4..e49f65dd2 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -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| diff --git a/Library/Homebrew/test/audit_test.rb b/Library/Homebrew/test/audit_test.rb index 9165edef1..1d93c31e0 100644 --- a/Library/Homebrew/test/audit_test.rb +++ b/Library/Homebrew/test/audit_test.rb @@ -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", |
