From 82e268a3e2b9dea0a9835ea837e766015b2e98d0 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Wed, 19 Apr 2017 12:23:55 -0700 Subject: [PATCH] Quote exec_path to properly handle spaces in path Fixes #7234 --- plugins/provisioners/shell/provisioner.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/provisioners/shell/provisioner.rb b/plugins/provisioners/shell/provisioner.rb index 8b01a5544..e88ef3d5d 100644 --- a/plugins/provisioners/shell/provisioner.rb +++ b/plugins/provisioners/shell/provisioner.rb @@ -187,7 +187,7 @@ module VagrantPlugins # CLIXML output is kinda useless, especially on non-windows hosts shell_args += " -OutputFormat Text" if config.powershell_args !~ /[-\/]OutputFormat/i - command = "#{exec_path}#{args}" + command = "\"#{exec_path}\"#{args}" command = "powershell #{shell_args.to_s} -file #{command}" if File.extname(exec_path).downcase == '.ps1'