From ed8ecd15e129260b454877d4462a5344d31d293f Mon Sep 17 00:00:00 2001 From: Mikhail Emelchenkov Date: Mon, 28 May 2018 20:34:56 +0500 Subject: [PATCH] Fix: `trigger` embedded plugin fails to exec scripts at paths contains spaces --- lib/vagrant/plugin/v2/trigger.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant/plugin/v2/trigger.rb b/lib/vagrant/plugin/v2/trigger.rb index 471949840..63b5a9386 100644 --- a/lib/vagrant/plugin/v2/trigger.rb +++ b/lib/vagrant/plugin/v2/trigger.rb @@ -157,7 +157,7 @@ module Vagrant @machine.ui.detail(I18n.t("vagrant.trigger.run.inline", command: config.inline)) else - cmd = File.expand_path(config.path, @env.root_path) + cmd = File.expand_path(config.path, @env.root_path).shellescape args = Array(config.args) cmd << " #{args.join(' ')}" if !args.empty? cmd = Shellwords.split(cmd)