Sha256: 65c9d6a479c9f8f27ebe31b884645534f7d37d74860a1a3062d52be13e2368ad
Contents?: true
Size: 774 Bytes
Versions: 13
Compression:
Stored size: 774 Bytes
Contents
module VagrantPlugins module CommandDestroy class Command < Vagrant.plugin("2", :command) def execute options = {} options[:force] = false opts = OptionParser.new do |o| o.banner = "Usage: vagrant destroy [vm-name]" o.separator "" o.on("-f", "--force", "Destroy without confirmation.") do |f| options[:force] = f end end # Parse the options argv = parse_options(opts) return if !argv @logger.debug("'Destroy' each target VM...") with_target_vms(argv, :reverse => true) do |vm| vm.action(:destroy, :force_confirm_destroy => options[:force]) end # Success, exit status 0 0 end end end end
Version data entries
13 entries across 13 versions & 5 rubygems