FormulaInstaller: flush before closing writes.
This seems to help the problem with `brew install -v` sometimes truncating output. Closes Homebrew/homebrew#24666.
This commit is contained in:
parent
435e293857
commit
3c3bd76528
@ -46,6 +46,7 @@ def main
|
|||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
unless error_pipe.nil?
|
unless error_pipe.nil?
|
||||||
e.continuation = nil if ARGV.debug?
|
e.continuation = nil if ARGV.debug?
|
||||||
|
error_pipe.flush
|
||||||
Marshal.dump(e, error_pipe)
|
Marshal.dump(e, error_pipe)
|
||||||
error_pipe.close
|
error_pipe.close
|
||||||
exit! 1
|
exit! 1
|
||||||
|
|||||||
@ -371,6 +371,7 @@ class FormulaInstaller
|
|||||||
read.close
|
read.close
|
||||||
exec(*args)
|
exec(*args)
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
|
write.flush
|
||||||
Marshal.dump(e, write)
|
Marshal.dump(e, write)
|
||||||
write.close
|
write.close
|
||||||
exit! 1
|
exit! 1
|
||||||
@ -378,6 +379,7 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
ignore_interrupts(:quietly) do # the fork will receive the interrupt and marshall it back
|
ignore_interrupts(:quietly) do # the fork will receive the interrupt and marshall it back
|
||||||
|
write.flush
|
||||||
write.close
|
write.close
|
||||||
Process.wait
|
Process.wait
|
||||||
data = read.read
|
data = read.read
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user