link: fix output ordering when exceptions are raised
This commit is contained in:
parent
3a48d7ab9b
commit
1f0d424459
@ -52,6 +52,17 @@ module Homebrew extend self
|
|||||||
# an exception is thrown, its output starts on a new line.
|
# an exception is thrown, its output starts on a new line.
|
||||||
def print str, &block
|
def print str, &block
|
||||||
Kernel.print str
|
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
|
puts_capture = Class.new do
|
||||||
def self.puts(*args)
|
def self.puts(*args)
|
||||||
$did_puts = true
|
$did_puts = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user