From 23962baac97c3e1cdc6a755419d61c48255205ea Mon Sep 17 00:00:00 2001 From: Timothy Sutton Date: Wed, 7 Aug 2013 17:10:32 -0400 Subject: [PATCH] Darwin: use :sudo for communicate.test --- plugins/guests/darwin/cap/mount_vmware_shared_folder.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/guests/darwin/cap/mount_vmware_shared_folder.rb b/plugins/guests/darwin/cap/mount_vmware_shared_folder.rb index 7b932cd43..5b1cce976 100644 --- a/plugins/guests/darwin/cap/mount_vmware_shared_folder.rb +++ b/plugins/guests/darwin/cap/mount_vmware_shared_folder.rb @@ -11,18 +11,18 @@ module VagrantPlugins def self.mount_vmware_shared_folder(machine, name, guestpath, options) machine.communicate.tap do |comm| # clear prior symlink - if comm.test("sudo test -L \"#{guestpath}\"") + if comm.test("test -L \"#{guestpath}\"", :sudo => true) comm.sudo("rm \"#{guestpath}\"") end # clear prior directory if exists - if comm.test("sudo test -d \"#{guestpath}\"") + if comm.test("test -d \"#{guestpath}\"", :sudo => true) comm.sudo("rm -Rf \"#{guestpath}\"") end # create intermediate directories if needed intermediate_dir = File.dirname(guestpath) - if !comm.test("sudo test -d \"#{intermediate_dir}\"") + if !comm.test("test -d \"#{intermediate_dir}\"", :sudo => true) comm.sudo("mkdir -p \"#{intermediate_dir}\"") end