diff options
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/installer.rb')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/installer.rb | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/installer.rb b/Library/Homebrew/cask/lib/hbc/installer.rb index 553d947f9..8520f154d 100644 --- a/Library/Homebrew/cask/lib/hbc/installer.rb +++ b/Library/Homebrew/cask/lib/hbc/installer.rb @@ -35,30 +35,12 @@ module Hbc def self.print_caveats(cask) odebug "Printing caveats" - return if cask.caveats.empty? - - output = capture_output do - cask.caveats.each do |caveat| - if caveat.respond_to?(:eval_and_print) - caveat.eval_and_print(cask) - else - puts caveat - end - end - end - return if output.empty? - ohai "Caveats" - puts output - end + caveats = cask.caveats + return if caveats.empty? - def self.capture_output(&block) - old_stdout = $stdout - $stdout = Buffer.new($stdout.tty?) - block.call - output = $stdout.string - $stdout = old_stdout - output + ohai "Caveats" + puts caveats + "\n" end def fetch |
