diff options
| author | Max Howell | 2012-03-15 13:04:17 +0000 |
|---|---|---|
| committer | Max Howell | 2012-03-15 13:04:17 +0000 |
| commit | c3f9ec42f71d56e37dec4adb1b02745ef8bcdc43 (patch) | |
| tree | f2f4bd841c1aa26757ebc8d47c6eb9a591829161 | |
| parent | 5adc55ac0ab534cf9a2aa11f6e286b0b0e8b2fd8 (diff) | |
| download | homebrew-c3f9ec42f71d56e37dec4adb1b02745ef8bcdc43.tar.bz2 | |
ohai'ing this is ugly IMO
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
| -rw-r--r-- | Library/Homebrew/formula.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 26b25cbf7..d2d8995d2 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 |
