vagrant/plugins/communicators/winssh/config.rb

38 lines
952 B
Ruby
Raw Normal View History

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
2017-04-15 10:12:58 -04:00
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
2017-04-15 10:12:58 -04:00
def finalize!
@shell = "powershell" if @shell == UNSET_VALUE
@sudo_command = "%c" if @sudo_command == UNSET_VALUE
@upload_directory = "C:/Windows/Temp" if @upload_directory == UNSET_VALUE
2017-04-15 10:12:58 -04:00
if @export_command_template == UNSET_VALUE
@export_command_template = '$env:%ENV_KEY%="%ENV_VALUE%"'
2017-04-15 10:12:58 -04:00
end
super
end
def to_s
"WINSSH"
end
2017-04-16 11:08:22 -04:00
# Remove configuration options from regular SSH that are
# not used within this communicator
undef :forward_x11
undef :pty
2017-04-15 10:12:58 -04:00
end
end
end