Skip to content

Commit

Permalink
include stderr output in Grit::Git::CommandFailed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Mar 4, 2011
1 parent fdbead1 commit 0574dd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/grit/git.rb
Expand Up @@ -28,7 +28,9 @@ def initialize(command, exitstatus=nil, err='')
@command = command
@exitstatus = exitstatus
@err = err
super "Command exited with #{exitstatus}: #{command}"
message = "Command failed [#{exitstatus}]: #{command}"
message << "\n\n" << err unless err.nil? || err.empty?
super message
else
super command
end
Expand Down

0 comments on commit 0574dd7

Please sign in to comment.