Skip to content

Commit f022aee

Browse files
author
jimweirich
committed
Shortened error on task failure.
git-svn-id: svn+ssh://rubyforge.org/var/svn/rake/trunk@403 5af023f1-ac1a-0410-98d6-829a145c37ef
1 parent 5a3950d commit f022aee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rake/lib/rake.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,10 @@ def sh(*cmd, &block)
479479
options = {}
480480
end
481481
unless block_given?
482+
show_command = cmd.join(" ")
483+
show_command = show_command[0,42] + "..." if show_command.length > 45
482484
block = lambda { |ok, status|
483-
ok or fail "Command failed with status (#{status.exitstatus}): [#{cmd.join(" ")}]"
485+
ok or fail "Command failed with status (#{status.exitstatus}): [#{show_command}]"
484486
}
485487
end
486488
fu_check_options options, :noop, :verbose

0 commit comments

Comments
 (0)