Sha256: ae687b7111f2d0baf9f54ca04c84a42714bfa512c6e0da4a6624418f7ede3b27

Contents?: true

Size: 1007 Bytes

Versions: 30

Compression:

Stored size: 1007 Bytes

Contents

require File.expand_path("../../../kernel_v2/config/ssh", __FILE__)

module VagrantPlugins
  module CommunicatorWinSSH
    class Config < VagrantPlugins::Kernel_V2::SSHConfig

      attr_accessor :upload_directory

      def initialize
        super
        @upload_directory = UNSET_VALUE
      end

      def finalize!
        @shell = "cmd" if @shell == UNSET_VALUE
        @sudo_command = "%c" if @sudo_command == UNSET_VALUE
        @upload_directory = "C:\\Windows\\Temp" if @upload_directory == UNSET_VALUE
        if @export_command_template == UNSET_VALUE
          if @shell == "cmd"
            @export_command_template = 'set %ENV_KEY%="%ENV_VALUE%"'
          else
            @export_command_template = '$env:%ENV_KEY%="%ENV_VALUE%"'
          end
        end
        super
      end

      def to_s
        "WINSSH"
      end

      # Remove configuration options from regular SSH that are
      # not used within this communicator
      undef :forward_x11
      undef :pty
    end
  end
end

Version data entries

30 entries across 26 versions & 4 rubygems

Version Path
vagrant-unbundled-2.2.7.0 plugins/communicators/winssh/config.rb
vagrant-unbundled-2.2.6.2 plugins/communicators/winssh/config.rb
vagrant-unbundled-2.2.6.1 plugins/communicators/winssh/config.rb
vagrant-unbundled-2.2.6.0 plugins/communicators/winssh/config.rb
vagrant-unbundled-2.2.5.0 plugins/communicators/winssh/config.rb
vagrant-unbundled-2.2.4.0 plugins/communicators/winssh/config.rb
vagrant-unbundled-2.2.3.0 plugins/communicators/winssh/config.rb
vagrant-unbundled-2.2.2.0 plugins/communicators/winssh/config.rb
vagrant-unbundled-2.2.0.0 plugins/communicators/winssh/config.rb
vagrant-unbundled-2.1.4.0 plugins/communicators/winssh/config.rb
vagrant-unbundled-2.1.2.0 plugins/communicators/winssh/config.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/plugins/communicators/winssh/config.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/plugins/communicators/winssh/config.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/plugins/communicators/winssh/config.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/plugins/communicators/winssh/config.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/plugins/communicators/winssh/config.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/plugins/communicators/winssh/config.rb
vagrant-unbundled-2.1.1.0 plugins/communicators/winssh/config.rb
vagrant-unbundled-2.0.4.0 plugins/communicators/winssh/config.rb
vagrant-unbundled-2.0.3.0 plugins/communicators/winssh/config.rb