From 544b3c38c84d349734f259d71735ef15d6e0a78c Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 15 Mar 2012 13:04:17 +0000 Subject: [PATCH] ohai'ing this is ugly IMO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I wanted to make it possible to not do the additional newline (in brew) if this code path is hit. But I didn't see a way to do it without overriding the Interrupt exception and throwing a new one. “Never add more code than necessary for aesthetics in error handling.” — mxcl --- Library/Homebrew/formula.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 26b25cbf7a..d2d8995d26 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -191,10 +191,11 @@ class Formula # so load any deps before this point! And exit asap afterwards yield self rescue Interrupt, RuntimeError, SystemCallError => e + puts if Interrupt === e # don't print next to the ^C unless ARGV.debug? %w(config.log CMakeCache.txt).select{|f| File.exist? f}.each do |f| HOMEBREW_LOGS.install f - ohai "#{f} was copied to #{HOMEBREW_LOGS}" + puts "#{f} was copied to #{HOMEBREW_LOGS}" end raise end