Fixes 4309
When the winrm communicator executes a command in an elevated shell, this patch causes it to escape double quotes. This is necessary as the first line in the file that it produces and then executes it puts the command into a variable called command that is delimited by double quotes.
This commit is contained in:
parent
a08d9078da
commit
4a2566c646
|
@ -125,7 +125,7 @@ module VagrantPlugins
|
|||
script = Vagrant::Util::TemplateRenderer.render(path, options: {
|
||||
username: shell.username,
|
||||
password: shell.password,
|
||||
command: command,
|
||||
command: command.gsub("\"", "`\""),
|
||||
})
|
||||
guest_script_path = "c:/tmp/vagrant-elevated-shell.ps1"
|
||||
file = Tempfile.new(["vagrant-elevated-shell", "ps1"])
|
||||
|
|
Loading…
Reference in New Issue