vagrant destroy --force works [GH-1340]
This commit is contained in:
parent
e1b78dbfbe
commit
f7b39476a0
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue