Skip to content

Commit

Permalink
show extended output on testtask fail only with verbose or trace
Browse files Browse the repository at this point in the history
  • Loading branch information
bretts committed Sep 20, 2016
1 parent 93e55a4 commit 21130fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/rake/testtask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ def define
if !ok && status.respond_to?(:signaled?) && status.signaled?
raise SignalException.new(status.termsig)
elsif !ok
fail "Command failed with status (#{status.exitstatus}): " +
"[ruby #{args}]"
status = "Command failed with status (#{status.exitstatus})"
details = ": [ruby #{args}]"
fail (ARGV.include?('--trace') || @verbose) ? (status + details) : status
end
end
end
Expand Down

0 comments on commit 21130fe

Please sign in to comment.