aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-05-03 17:17:12 +0100
committerMike McQuaid2013-05-03 17:17:12 +0100
commite0eb17cd44f2623957a263ca1ab600fac771a92c (patch)
treec2684d0a7ca3ef2dd73259ce4f0dc70e38f0e36a /Library
parenta89d55c6253b87f94d27a083d723616c32298c1c (diff)
downloadhomebrew-e0eb17cd44f2623957a263ca1ab600fac771a92c.tar.bz2
brew-test-bot: fix output handling.
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/cmd/brew-test-bot.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb
index 57ecaddfb..2ada7baa7 100755
--- a/Library/Contributions/cmd/brew-test-bot.rb
+++ b/Library/Contributions/cmd/brew-test-bot.rb
@@ -61,20 +61,20 @@ class Step
step.puts_command
command = "#{step.command} &>#{step.log_file_path}"
-
- output = nil
if command.start_with? 'git '
Dir.chdir step.repository do
- output = `#{command}`
+ `#{command}`
end
else
- output = `#{command}`
+ `#{command}`
end
- output = IO.read(step.log_file_path) rescue nil
success = $?.success?
step.status = success ? :passed : :failed
step.puts_result
+
+ return unless File.exists?(step.log_file_path)
+ output = IO.read(step.log_file_path)
if output and output.any? and (not success or puts_output_on_success)
puts output
end