vagrant/lib/vagrant/command/destroy.rb

19 lines
392 B
Ruby
Raw Normal View History

2010-08-25 06:05:40 +00:00
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