diff options
| author | Jack Nagel | 2014-03-27 16:24:57 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-27 16:27:46 -0500 |
| commit | 1f0d424459e3c3a3002d5a6788904b8e4abdf9f0 (patch) | |
| tree | 54b317bad9721a4ee4168d937d6efb3d99f22fd3 /Library/Homebrew/cmd | |
| parent | 3a48d7ab9bb26ce8a2ecfa17c8ef8ecf3dcd916f (diff) | |
| download | brew-1f0d424459e3c3a3002d5a6788904b8e4abdf9f0.tar.bz2 | |
link: fix output ordering when exceptions are raised
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/link.rb | 11 |
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 |
