Omit empty caveats

This commit is contained in:
Adam Vandenberg 2011-12-20 20:11:54 -08:00
parent e65649aeb0
commit fca07369ab
2 changed files with 5 additions and 2 deletions

View File

@ -70,7 +70,8 @@ module Homebrew extend self
end
end
if f.caveats
the_caveats = (f.caveats || "").strip
unless the_caveats.empty?
puts
puts f.caveats
puts

View File

@ -72,10 +72,12 @@ class FormulaInstaller
end
def caveats
if f.caveats
the_caveats = (f.caveats || "").strip
unless the_caveats.empty?
ohai "Caveats", f.caveats
@show_summary_heading = true
end
if f.keg_only?
ohai 'Caveats', f.keg_only_text
@show_summary_heading = true