From f7b39476a0ffc0182b289a0b248b04be404b8916 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 29 Jan 2013 10:33:40 -0800 Subject: [PATCH] vagrant destroy --force works [GH-1340] --- plugins/commands/destroy/command.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/commands/destroy/command.rb b/plugins/commands/destroy/command.rb index 2a1dc5408..3b245f035 100644 --- a/plugins/commands/destroy/command.rb +++ b/plugins/commands/destroy/command.rb @@ -3,6 +3,7 @@ module VagrantPlugins class Command < Vagrant.plugin("2", :command) def execute options = {} + options[:force] = false opts = OptionParser.new do |o| o.banner = "Usage: vagrant destroy [vm-name]" @@ -19,7 +20,7 @@ module VagrantPlugins @logger.debug("'Destroy' each target VM...") with_target_vms(argv, :reverse => true) do |vm| - vm.action(:destroy) + vm.action(:destroy, :force_confirm_destroy => options[:force]) end # Success, exit status 0