Fix two bugs in WinSSH -- a hang when executing powershell via SSH, and when cmd shell is default renaming computer was attempting to execute powershell commands via a batch script
This commit is contained in:
parent
b28e6d95a6
commit
29e741c30c
|
@ -36,7 +36,7 @@ module VagrantPlugins
|
|||
remote_name = "#{machine_config_ssh.upload_directory}\\#{File.basename(tfile.path)}.#{remote_ext}"
|
||||
|
||||
if shell == "powershell"
|
||||
base_cmd = "powershell -File #{remote_name}"
|
||||
base_cmd = "powershell -File #{remote_name} -InputFormat None"
|
||||
tfile.puts <<-SCRIPT.force_encoding('ASCII-8BIT')
|
||||
Remove-Item #{remote_name}
|
||||
Write-Host #{CMD_GARBAGE_MARKER}
|
||||
|
|
|
@ -23,7 +23,8 @@ module VagrantPlugins
|
|||
machine.communicate.execute(
|
||||
script,
|
||||
error_class: Errors::RenameComputerFailed,
|
||||
error_key: :rename_computer_failed)
|
||||
error_key: :rename_computer_failed,
|
||||
shell: "powershell")
|
||||
|
||||
machine.guest.capability(:reboot)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue