Skip to content

Commit

Permalink
scm: cvs: use self.class.sq_bin for command name at adpter scm_cmd() …
Browse files Browse the repository at this point in the history
…(#8825).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6277 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information
marutosi committed Jul 15, 2011
1 parent 7d15b28 commit e748e37
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/redmine/scm/adapters/cvs_adapter.rb
Expand Up @@ -376,13 +376,16 @@ def format_identifier
end

def scm_cmd(*args, &block)
full_args = [CVS_BIN, '-d', root_url]
full_args = ['-d', root_url]
full_args += args
full_args_locale = []
full_args.map do |e|
full_args_locale << scm_iconv(@path_encoding, 'UTF-8', e)
end
ret = shellout(full_args_locale.map { |e| shell_quote e.to_s }.join(' '), &block)
ret = shellout(
self.class.sq_bin + ' ' + full_args_locale.map { |e| shell_quote e.to_s }.join(' '),
&block
)
if $? && $?.exitstatus != 0
raise ScmCommandAborted, "cvs exited with non-zero status: #{$?.exitstatus}"
end
Expand Down

0 comments on commit e748e37

Please sign in to comment.