Skip to content

Commit f537fa1

Browse files
committed
Fixed broken tests
1 parent a3d9d39 commit f537fa1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/vSphere/action/clone.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def call(env)
1818
machine = env[:machine]
1919
config = machine.provider_config
2020
connection = env[:vSphere_connection]
21-
name = get_name machine, config, env[:root_path].basename.to_s
21+
name = get_name machine, config, env[:root_path]
2222
dc = get_datacenter connection, machine
2323
template = dc.find_vm config.template_name
2424
raise Errors::VSphereError, :'missing_template' if template.nil?
@@ -121,7 +121,7 @@ def get_location(connection, machine, config, template)
121121
def get_name(machine, config, root_path)
122122
return config.name unless config.name.nil?
123123

124-
prefix = "#{root_path}_#{machine.name}"
124+
prefix = "#{root_path.basename.to_s}_#{machine.name}"
125125
prefix.gsub!(/[^-a-z0-9_\.]/i, "")
126126
# milliseconds + random number suffix to allow for simultaneous `vagrant up` of the same box in different dirs
127127
prefix + "_#{(Time.now.to_f * 1000.0).to_i}_#{rand(100000)}"

0 commit comments

Comments
 (0)