tenderloin 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,12 +14,13 @@ module Tenderloin
|
|
14
14
|
# also verify that the host path exists, the name is valid,
|
15
15
|
# and that the guest path is valid.
|
16
16
|
shared_folders.collect do |folder|
|
17
|
-
if folder.is_a?(Array) && folder.length
|
17
|
+
if folder.is_a?(Array) && [2, 3].include?(folder.length)
|
18
18
|
folder
|
19
19
|
else
|
20
|
+
logger.warn("Ignoring invalid shared folder: #{folder}")
|
20
21
|
nil
|
21
22
|
end
|
22
|
-
end
|
23
|
+
end.compact
|
23
24
|
end
|
24
25
|
|
25
26
|
def before_boot
|
@@ -52,7 +53,10 @@ module Tenderloin
|
|
52
53
|
|
53
54
|
Tenderloin::SSH.execute(@runner.fusion_vm.ip) do |ssh|
|
54
55
|
shared_folders.each do |name, hostpath, guestpath|
|
56
|
+
next unless guestpath
|
57
|
+
|
55
58
|
logger.info "-- #{name}: #{guestpath}"
|
59
|
+
ssh.exec!("sudo rm -rf #{guestpath}")
|
56
60
|
ssh.exec!("sudo ln -s /mnt/hgfs/#{name} #{guestpath}")
|
57
61
|
ssh.exec!("sudo chown #{Tenderloin.config.ssh.username} #{guestpath}")
|
58
62
|
end
|