Use predicate method and eliminate local
This commit is contained in:
parent
f6eedf9464
commit
9321873eef
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user