Class: Mercurial::Shell
- Inherits:
-
Object
- Object
- Mercurial::Shell
- Defined in:
- lib/core_ext/mercurial-ruby/shell.rb
Class Method Summary collapse
-
.interpolate_arguments(cmd_with_args) ⇒ Object
windows command line doesn’t like single quotes.
Class Method Details
.interpolate_arguments(cmd_with_args) ⇒ Object
windows command line doesn’t like single quotes
6 7 8 9 10 11 12 13 14 15 16 |
# 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 |