diff options
| author | Jack Nagel | 2014-03-27 16:24:57 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-27 16:27:46 -0500 |
| commit | c11a5babc0c8ab97e692fdf9924896b21bfc4956 (patch) | |
| tree | b8e55b379814861889e05ccc7e51ccdb0660fd92 | |
| parent | fe35d9aa7947bfd4e1323f3fb2d8968d2783bc4f (diff) | |
| download | homebrew-c11a5babc0c8ab97e692fdf9924896b21bfc4956.tar.bz2 | |
link: fix output ordering when exceptions are raised
| -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 |
