vagrant destroy --force works [GH-1340]

This commit is contained in:
Mitchell Hashimoto 2013-01-29 10:33:40 -08:00
parent e1b78dbfbe
commit f7b39476a0
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ module VagrantPlugins
class Command < Vagrant.plugin("2", :command) class Command < Vagrant.plugin("2", :command)
def execute def execute
options = {} options = {}
options[:force] = false
opts = OptionParser.new do |o| opts = OptionParser.new do |o|
o.banner = "Usage: vagrant destroy [vm-name]" o.banner = "Usage: vagrant destroy [vm-name]"
@ -19,7 +20,7 @@ module VagrantPlugins
@logger.debug("'Destroy' each target VM...") @logger.debug("'Destroy' each target VM...")
with_target_vms(argv, :reverse => true) do |vm| with_target_vms(argv, :reverse => true) do |vm|
vm.action(:destroy) vm.action(:destroy, :force_confirm_destroy => options[:force])
end end
# Success, exit status 0 # Success, exit status 0