From: Toshi MARUYAMA Date: Fri, 15 Jul 2011 11:43:53 +0000 (+0000) Subject: scm: add new method "shell_quote_command" at abstract adapter (#8825). X-Git-Tag: 1.3.0~1660 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ecc042dce1c10e3496f50abe07923e6df3a1f799;p=redmine.git scm: add new method "shell_quote_command" at abstract adapter (#8825). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6272 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb index 29b401a81..9228dbe2d 100644 --- a/lib/redmine/scm/adapters/abstract_adapter.rb +++ b/lib/redmine/scm/adapters/abstract_adapter.rb @@ -33,6 +33,14 @@ module Redmine "" end + def shell_quote_command + if Redmine::Platform.mswin? && RUBY_PLATFORM == 'java' + client_command + else + shell_quote(client_command) + end + end + # Returns the version of the scm client # Eg: [1, 5, 0] or [] if unknown def client_version