`vagrant destroy`

This commit is contained in:
Mitchell Hashimoto 2010-08-24 23:05:40 -07:00
parent 8340472fc5
commit fd5b2dee27
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
module Vagrant
module Command
class DestroyCommand < Base
desc "Destroy the environment, deleting the created virtual machines."
register "destroy"
def execute
target_vms.each do |vm|
if vm.created?
vm.destroy
else
vm.env.ui.info "VM not created. Moving on..."
end
end
end
end
end
end