vagrant/lib/vagrant/command/destroy.rb

18 lines
404 B
Ruby
Raw Normal View History

2010-08-25 06:05:40 +00:00
module Vagrant
module Command
class DestroyCommand < NamedBase
register "destroy", "Destroy the environment, deleting the created virtual machines"
2010-08-25 06:05:40 +00:00
def execute
target_vms.each do |vm|
if vm.created?
vm.destroy
else
vm.env.ui.info I18n.t("vagrant.commands.common.vm_not_created")
2010-08-25 06:05:40 +00:00
end
end
end
end
end
end