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
This commit is contained in:
Toshi MARUYAMA 2011-07-15 11:53:39 +00:00
parent f5a6b0cf93
commit 68e97858cb
1 changed files with 5 additions and 1 deletions

View File

@ -216,7 +216,11 @@ module Redmine
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, "