aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorMisty De Meo2017-02-26 16:49:09 +1100
committerMisty De Meo2017-02-27 08:24:44 +1100
commite3f4701f385c286a2cc72c5d07870cc9a6ce0bf4 (patch)
tree5f0ca1e6fae4ad61391e298181191c5a59bcd82e /Library/Homebrew/dev-cmd
parentff93e1624b214c9b48731174a9135789fc3695a8 (diff)
downloadbrew-e3f4701f385c286a2cc72c5d07870cc9a6ce0bf4.tar.bz2
audit: fix audit on formulae without homepages
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 35d590b69..a8c18f7b6 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -605,6 +605,11 @@ class FormulaAuditor
def audit_homepage
homepage = formula.homepage
+ if homepage.nil? || homepage.empty?
+ problem "Formula should have a homepage."
+ return
+ end
+
unless homepage =~ %r{^https?://}
problem "The homepage should start with http or https (URL is #{homepage})."
end