vagrant/plugins/communicators/winssh/config.rb

28 lines
682 B
Ruby
Raw Normal View History

2017-04-15 14:12:58 +00:00
require File.expand_path("../../../kernel_v2/config/ssh", __FILE__)
# forward_x11 pty sudo_command
2017-04-15 14:12:58 +00:00
module VagrantPlugins
module CommunicatorWinSSH
class Config < VagrantPlugins::Kernel_V2::SSHConfig
def finalize!
@shell = "cmd" if @shell == UNSET_VALUE
@sudo_command = "%c" if @sudo_command == UNSET_VALUE
2017-04-15 14:12:58 +00:00
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
end
end
end