Permalink
Browse files

Merge(backport) r6230 from trunk (#8825).

scm: catch all exceptions at adapter shellout() to fork scm command.

If scm command does not exist,
Linux JRuby 1.6.2 (ruby-1.8.7-p330) raises java.io.IOException in production environment.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.2-stable@6273 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information...
1 parent f5a6b0c commit 68e97858cb02a189a7241aeb3012ab3b54b0d94d @marutosi marutosi committed Jul 15, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/redmine/scm/adapters/abstract_adapter.rb
@@ -216,7 +216,11 @@ def self.shellout(cmd, &block)
io.close_write
block.call(io) if block_given?
end
- rescue Errno::ENOENT => e
+ ## If scm command does not exist,
+ ## Linux JRuby 1.6.2 (ruby-1.8.7-p330) raises java.io.IOException
+ ## in production environment.
+ # rescue Errno::ENOENT => e
+ rescue Exception => e
msg = strip_credential(e.message)
# The command failed, log it and re-raise
logmsg = "SCM command failed, "

0 comments on commit 68e9785

Please sign in to comment.