core: clean up machine directory when id = nil

This commit is contained in:
Mitchell Hashimoto 2013-08-31 23:02:16 -07:00
parent a96efcdec9
commit 4608e75b48
1 changed files with 6 additions and 0 deletions

View File

@ -207,6 +207,12 @@ module Vagrant
else
# Delete the file, since the machine is now destroyed
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
# Store the ID locally