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:
Mike McQuaid 2013-11-26 16:28:18 +00:00
parent 435e293857
commit 3c3bd76528
2 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,7 @@ def main
rescue Exception => e
unless error_pipe.nil?
e.continuation = nil if ARGV.debug?
error_pipe.flush
Marshal.dump(e, error_pipe)
error_pipe.close
exit! 1

View File

@ -371,6 +371,7 @@ class FormulaInstaller
read.close
exec(*args)
rescue Exception => e
write.flush
Marshal.dump(e, write)
write.close
exit! 1
@ -378,6 +379,7 @@ class FormulaInstaller
end
ignore_interrupts(:quietly) do # the fork will receive the interrupt and marshall it back
write.flush
write.close
Process.wait
data = read.read