Fix resolution of puppet path for <4.0
This commit is contained in:
parent
b40426aca5
commit
0efb9a3932
|
@ -145,12 +145,12 @@ module VagrantPlugins
|
||||||
|
|
||||||
def verify_binary(binary)
|
def verify_binary(binary)
|
||||||
if !machine.communicate.test("sh -c 'command -v #{binary}'")
|
if !machine.communicate.test("sh -c 'command -v #{binary}'")
|
||||||
@config.binary_path = "/opt/puppetlabs/bin"
|
@config.binary_path = "/opt/puppetlabs/bin/"
|
||||||
@machine.communicate.sudo(
|
@machine.communicate.sudo(
|
||||||
"test -x /opt/puppetlabs/bin/#{binary}",
|
"test -x /opt/puppetlabs/bin/#{binary}",
|
||||||
error_class: PuppetError,
|
error_class: PuppetError,
|
||||||
error_key: :not_detected,
|
error_key: :not_detected,
|
||||||
binary: binary)
|
binary: binary)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ module VagrantPlugins
|
||||||
facter = "#{facts.join(" ")} "
|
facter = "#{facts.join(" ")} "
|
||||||
end
|
end
|
||||||
|
|
||||||
command = "#{facter} #{config.binary_path}/puppet apply #{options}"
|
command = "#{facter} #{config.binary_path}puppet apply #{options}"
|
||||||
if config.working_directory
|
if config.working_directory
|
||||||
if windows?
|
if windows?
|
||||||
command = "cd #{config.working_directory}; if (`$?) \{ #{command} \}"
|
command = "cd #{config.working_directory}; if (`$?) \{ #{command} \}"
|
||||||
|
|
Loading…
Reference in New Issue