aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2014-03-27 16:24:57 -0500
committerJack Nagel2014-03-27 16:27:46 -0500
commit1f0d424459e3c3a3002d5a6788904b8e4abdf9f0 (patch)
tree54b317bad9721a4ee4168d937d6efb3d99f22fd3 /Library/Homebrew
parent3a48d7ab9bb26ce8a2ecfa17c8ef8ecf3dcd916f (diff)
downloadbrew-1f0d424459e3c3a3002d5a6788904b8e4abdf9f0.tar.bz2
link: fix output ordering when exceptions are raised
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/link.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb
index 742195d6d..840ad5353 100644
--- a/Library/Homebrew/cmd/link.rb
+++ b/Library/Homebrew/cmd/link.rb
@@ -52,6 +52,17 @@ module Homebrew extend self
# an exception is thrown, its output starts on a new line.
def print str, &block
Kernel.print str
+
+ STDERR.extend Module.new {
+ def puts(*args)
+ unless $did_puts
+ STDOUT.puts
+ $did_puts = true
+ end
+ super
+ end
+ }
+
puts_capture = Class.new do
def self.puts(*args)
$did_puts = true