diff options
| author | Mike McQuaid | 2013-11-26 16:28:18 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2013-11-26 16:28:27 +0000 |
| commit | 5ce8f7a3a494e1d8e812369301fd4c4a05a7d9b7 (patch) | |
| tree | 2c17f36b3fd053ded3ecd6137facee482f8c17fa /Library | |
| parent | e15464cd2f98cd05aa9d04402e498b48e72babb3 (diff) | |
| download | homebrew-5ce8f7a3a494e1d8e812369301fd4c4a05a7d9b7.tar.bz2 | |
FormulaInstaller: flush before closing writes.
This seems to help the problem with `brew install -v` sometimes truncating output.
Closes #24666.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Homebrew/build.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index e75a6841e..693b129d4 100755 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -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 diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index c0348fe51..5612815e5 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -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 |
