aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-09-07 20:12:05 -0500
committerJack Nagel2014-09-07 20:25:12 -0500
commit6b423c8cfbf70ce614c88900989313e9d6b876e5 (patch)
tree9eb92d7c9ae386057feaa5cfd5c59ec540000011 /Library
parent758608815f24a8823918c76e710a8f2fba890b0b (diff)
downloadbrew-6b423c8cfbf70ce614c88900989313e9d6b876e5.tar.bz2
Make sure redirected stdout and stderr share the same offset
This fixes broken output like this: Error: No such file or directory - non_existent_file ee/src/tree-1.7.0.tgz Already downloaded: /Library/Caches/Homebrew/tree-1.7.0.tgz ==> Verifying tree-1.7.0.tgz checksum tar xf /Library/Caches/Homebrew/tree-1.7.0.tgz
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/cmd/brew-test-bot.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb
index 4393faa7c..da6ba1c6e 100755
--- a/Library/Contributions/cmd/brew-test-bot.rb
+++ b/Library/Contributions/cmd/brew-test-bot.rb
@@ -105,8 +105,10 @@ class Step
log = log_file_path
pid = fork do
- STDOUT.reopen(log, "wb")
- STDERR.reopen(log, "wb")
+ File.open(log, "wb") do |f|
+ STDOUT.reopen(f)
+ STDERR.reopen(f)
+ end
Dir.chdir(@repository) if @command.first == "git"
exec(*@command)
end