`vagrant box remove` uses new API

This commit is contained in:
Mitchell Hashimoto 2012-07-09 19:51:54 -07:00
parent 623ecb3e3d
commit 5b18a6525d
1 changed files with 4 additions and 4 deletions

View File

@ -8,17 +8,17 @@ module VagrantPlugins
options = {} options = {}
opts = OptionParser.new do |opts| opts = OptionParser.new do |opts|
opts.banner = "Usage: vagrant box remove <name>" opts.banner = "Usage: vagrant box remove <name> <provider>"
end end
# Parse the options # Parse the options
argv = parse_options(opts) argv = parse_options(opts)
return if !argv return if !argv
raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1 raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 2
b = @env.boxes.find(argv[0]) b = @env.boxes.find(argv[0], argv[1].to_sym)
raise Vagrant::Errors::BoxNotFound, :name => argv[0] if !b raise Vagrant::Errors::BoxNotFound, :name => argv[0] if !b
b.destroy b.destroy!
# Success, exit status 0 # Success, exit status 0
0 0