Only check for .vmcx if there is no XML found to not risk breaking older vagrant boxes that added an XML file manually
This commit is contained in:
parent
133e2a7b0f
commit
a77da314e5
|
@ -37,19 +37,28 @@ module VagrantPlugins
|
||||||
config_path = nil
|
config_path = nil
|
||||||
config_type = nil
|
config_type = nil
|
||||||
vm_dir.each_child do |f|
|
vm_dir.each_child do |f|
|
||||||
|
|
||||||
if f.extname.downcase == '.xml'
|
if f.extname.downcase == '.xml'
|
||||||
config_path = f
|
config_path = f
|
||||||
config_type = 'xml'
|
config_type = 'xml'
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if f.extname.downcase == '.vmcx'
|
end
|
||||||
config_path = f
|
|
||||||
config_type = 'vmcx'
|
|
||||||
break
|
# Only check for .vmcx if there is no XML found to not
|
||||||
|
# risk breaking older vagrant boxes that added an XML
|
||||||
|
# file manually
|
||||||
|
if config_type == nil
|
||||||
|
vm_dir.each_child do |f|
|
||||||
|
if f.extname.downcase == '.vmcx'
|
||||||
|
config_path = f
|
||||||
|
config_type = 'vmcx'
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
image_path = nil
|
image_path = nil
|
||||||
image_ext = nil
|
image_ext = nil
|
||||||
image_filename = nil
|
image_filename = nil
|
||||||
|
|
Loading…
Reference in New Issue