core: clean up machine directory when id = nil
This commit is contained in:
parent
a96efcdec9
commit
4608e75b48
|
@ -207,6 +207,12 @@ module Vagrant
|
||||||
else
|
else
|
||||||
# Delete the file, since the machine is now destroyed
|
# Delete the file, since the machine is now destroyed
|
||||||
id_file.delete if id_file.file?
|
id_file.delete if id_file.file?
|
||||||
|
|
||||||
|
# Delete the entire data directory contents since all state
|
||||||
|
# associated with the VM is now gone.
|
||||||
|
@data_dir.children.each do |child|
|
||||||
|
child.rmtree
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Store the ID locally
|
# Store the ID locally
|
||||||
|
|
Loading…
Reference in New Issue