vagrant/lib/vagrant/command/destroy.rb

19 lines
391 B
Ruby
Raw Normal View History

2010-08-25 06:05:40 +00:00
module Vagrant
module Command
class DestroyCommand < Base
2010-08-25 06:10:58 +00:00
desc "Destroy the environment, deleting the created virtual machines"
2010-08-25 06:05:40 +00:00
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