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
This commit is contained in:
parent
59436b194d
commit
544b3c38c8
@ -191,10 +191,11 @@ class Formula
|
|||||||
# so load any deps before this point! And exit asap afterwards
|
# so load any deps before this point! And exit asap afterwards
|
||||||
yield self
|
yield self
|
||||||
rescue Interrupt, RuntimeError, SystemCallError => e
|
rescue Interrupt, RuntimeError, SystemCallError => e
|
||||||
|
puts if Interrupt === e # don't print next to the ^C
|
||||||
unless ARGV.debug?
|
unless ARGV.debug?
|
||||||
%w(config.log CMakeCache.txt).select{|f| File.exist? f}.each do |f|
|
%w(config.log CMakeCache.txt).select{|f| File.exist? f}.each do |f|
|
||||||
HOMEBREW_LOGS.install f
|
HOMEBREW_LOGS.install f
|
||||||
ohai "#{f} was copied to #{HOMEBREW_LOGS}"
|
puts "#{f} was copied to #{HOMEBREW_LOGS}"
|
||||||
end
|
end
|
||||||
raise
|
raise
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user