Sha256: a7c44b8e0be70196e346595f25d0036a3df78d5cf3c87cbf52f253aec2051a7e

Contents?: true

Size: 456 Bytes

Versions: 12

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true

module Mercurial
  class Shell
    # windows command line doesn't like single quotes
    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
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
lolcommits-0.16.3 lib/core_ext/mercurial-ruby/shell.rb
lolcommits-0.16.2 lib/core_ext/mercurial-ruby/shell.rb
lolcommits-0.16.1 lib/core_ext/mercurial-ruby/shell.rb
lolcommits-0.16.0 lib/core_ext/mercurial-ruby/shell.rb
lolcommits-0.16.0.pre1 lib/core_ext/mercurial-ruby/shell.rb
lolcommits-0.15.1 lib/core_ext/mercurial-ruby/shell.rb
lolcommits-0.15.0 lib/core_ext/mercurial-ruby/shell.rb
lolcommits-0.14.2 lib/core_ext/mercurial-ruby/shell.rb
lolcommits-0.14.1 lib/core_ext/mercurial-ruby/shell.rb
lolcommits-0.14.0 lib/core_ext/mercurial-ruby/shell.rb
lolcommits-0.13.1 lib/core_ext/mercurial-ruby/shell.rb
lolcommits-0.13.0 lib/core_ext/mercurial-ruby/shell.rb