class Mercurial::Shell

Public Class Methods

interpolate_arguments(cmd_with_args) click to toggle source

windows command line doesn't like single quotes

# File lib/core_ext/mercurial-ruby/shell.rb, line 6
def self.interpolate_arguments(cmd_with_args)
  cmd_with_args.shift.tap do |cmd|
    cmd.gsub!(/\?/) do
      if Lolcommits::Platform.platform_windows?
        "\"#{cmd_with_args.shift}\""
      else
        cmd_with_args.shift.to_s.enclose_in_single_quotes
      end
    end
  end
end