Skip to content

Commit

Permalink
Shortened error on task failure.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://rubyforge.org/var/svn/rake/trunk@403 5af023f1-ac1a-0410-98d6-829a145c37ef
  • Loading branch information
jimweirich committed Apr 9, 2005
1 parent 5a3950d commit f022aee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rake/lib/rake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,10 @@ def sh(*cmd, &block)
options = {}
end
unless block_given?
show_command = cmd.join(" ")
show_command = show_command[0,42] + "..." if show_command.length > 45
block = lambda { |ok, status|
ok or fail "Command failed with status (#{status.exitstatus}): [#{cmd.join(" ")}]"
ok or fail "Command failed with status (#{status.exitstatus}): [#{show_command}]"
}
end
fu_check_options options, :noop, :verbose
Expand Down

0 comments on commit f022aee

Please sign in to comment.