From 9321873eef1c895b8d0fae23069dcfcf291f9a40 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 8 Sep 2014 19:44:08 -0500 Subject: [PATCH] Use predicate method and eliminate local --- Library/Contributions/cmd/brew-test-bot.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index ea8f98add9..30436263c3 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -116,13 +116,12 @@ class Step @time = Time.now - start_time - success = $?.success? - @status = success ? :passed : :failed + @status = $?.success? ? :passed : :failed puts_result if File.exist?(log) @output = File.read(log) - if has_output? and (not success or @puts_output_on_success) + if has_output? and (failed? or @puts_output_on_success) puts @output end FileUtils.rm(log) unless ARGV.include? "--keep-logs"