From 0efb9a393245f88aaff7e676442a1b7352c8e42d Mon Sep 17 00:00:00 2001 From: Ben Hines Date: Sun, 12 Apr 2015 12:29:50 -0700 Subject: [PATCH] Fix resolution of puppet path for <4.0 --- plugins/provisioners/puppet/provisioner/puppet.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/provisioners/puppet/provisioner/puppet.rb b/plugins/provisioners/puppet/provisioner/puppet.rb index e8aaea552..b205b6b79 100644 --- a/plugins/provisioners/puppet/provisioner/puppet.rb +++ b/plugins/provisioners/puppet/provisioner/puppet.rb @@ -145,12 +145,12 @@ module VagrantPlugins def verify_binary(binary) if !machine.communicate.test("sh -c 'command -v #{binary}'") - @config.binary_path = "/opt/puppetlabs/bin" - @machine.communicate.sudo( - "test -x /opt/puppetlabs/bin/#{binary}", - error_class: PuppetError, - error_key: :not_detected, - binary: binary) + @config.binary_path = "/opt/puppetlabs/bin/" + @machine.communicate.sudo( + "test -x /opt/puppetlabs/bin/#{binary}", + error_class: PuppetError, + error_key: :not_detected, + binary: binary) end end @@ -208,7 +208,7 @@ module VagrantPlugins facter = "#{facts.join(" ")} " end - command = "#{facter} #{config.binary_path}/puppet apply #{options}" + command = "#{facter} #{config.binary_path}puppet apply #{options}" if config.working_directory if windows? command = "cd #{config.working_directory}; if (`$?) \{ #{command} \}"