From ba2c1958186530a0f68e6cb2deeddb24e7b06caf Mon Sep 17 00:00:00 2001 From: pszlazak Date: Thu, 27 May 2021 14:34:15 +0200 Subject: [PATCH] Escape spaces in SSH key_path --- plugins/hosts/windows/cap/ssh.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hosts/windows/cap/ssh.rb b/plugins/hosts/windows/cap/ssh.rb index 63415bcb5..3cb75d90b 100644 --- a/plugins/hosts/windows/cap/ssh.rb +++ b/plugins/hosts/windows/cap/ssh.rb @@ -10,7 +10,7 @@ module VagrantPlugins def self.set_ssh_key_permissions(env, key_path) script_path = Host.scripts_path.join("set_ssh_key_permissions.ps1") result = Vagrant::Util::PowerShell.execute( - script_path.to_s, "-KeyPath", key_path.to_s, + script_path.to_s, "-KeyPath", key_path.to_s.gsub(' ', '` '), module_path: Host.modules_path.to_s ) if result.exit_code != 0