From 6b423c8cfbf70ce614c88900989313e9d6b876e5 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 7 Sep 2014 20:12:05 -0500 Subject: 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 --- Library/Contributions/cmd/brew-test-bot.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3