templates/Vagrantfile.erb in kitchen-vagrant-1.9.0 vs templates/Vagrantfile.erb in kitchen-vagrant-1.10.0
- old
+ new
@@ -171,10 +171,12 @@
<% end %>
<% when "virtualbox" %>
<% if key == :createhd %>
<% value = [value] unless value.instance_of?(Array) %>
<% value.each do |item| %>
- p.customize ["createhd", "--filename", "<%= item[:filename] %>", "--size", <%= item[:size] %>]
+ unless File.file?("<%= item[:filename] %>")
+ p.customize ["createhd", "--filename", "<%= item[:filename] %>", "--size", <%= item[:size] %>]
+ end
<% end %>
<% elsif key == :storageattach || key == :storagectl %>
<% value = [value] unless value.instance_of?(Array) %>
<% value.each do |item| %>
<% options = [] %>