tenderloin 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 == 3
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#.compact
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tenderloin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: