Simplify conditional

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-07-18 03:27:42 -05:00
parent 1d295ff3bc
commit c2725aa048
2 changed files with 2 additions and 4 deletions

View File

@ -96,8 +96,7 @@ module Homebrew extend self
Homebrew.dump_options_for_formula f
end
the_caveats = (f.caveats || "").strip
unless the_caveats.empty?
unless f.caveats.to_s.strip.empty?
ohai "Caveats"
puts f.caveats
end

View File

@ -141,8 +141,7 @@ class FormulaInstaller
end
def caveats
the_caveats = (f.caveats || "").strip
unless the_caveats.empty?
unless f.caveats.to_s.strip.empty?
ohai "Caveats", f.caveats
@show_summary_heading = true
end