Fix #6740: Ansible local provisioner: remove windows drive letter from path
This commit is contained in:
parent
984bc4ab77
commit
07f3d0b00d
|
@ -37,7 +37,11 @@ module VagrantPlugins
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def check_path(machine, path, test_args, error_message_key = nil)
|
def check_path(machine, path, test_args, error_message_key = nil)
|
||||||
remote_path = Pathname.new(path).expand_path(@provisioning_path)
|
remote_path = File.expand_path(path, @provisioning_path)
|
||||||
|
|
||||||
|
# Remove drive letter if running on a Windows host
|
||||||
|
remote_path = remote_path.gsub(/^[a-zA-Z]:/, "")
|
||||||
|
|
||||||
if machine.communicate.ready? && !machine.communicate.test("test #{test_args} #{remote_path}")
|
if machine.communicate.ready? && !machine.communicate.test("test #{test_args} #{remote_path}")
|
||||||
if error_message_key
|
if error_message_key
|
||||||
@errors << I18n.t(error_message_key, path: remote_path, system: "guest")
|
@errors << I18n.t(error_message_key, path: remote_path, system: "guest")
|
||||||
|
|
Loading…
Reference in New Issue