Proper error handling of missing arguments to all box commands

master
Mitchell Hashimoto 2012-01-20 15:23:33 -08:00
parent 9fce04c2cd
commit f2eff93c38
3 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,6 @@
## 0.9.3 (unreleased)
- Proper error handling for not enough arguments to `box add`.
- Proper error handling for not enough arguments to `box` commands.
## 0.9.2 (January 20, 2012)

View File

@ -13,6 +13,7 @@ module Vagrant
# Parse the options
argv = parse_options(opts)
return if !argv
raise Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1
b = @env.boxes.find(argv[0])
raise Errors::BoxNotFound, :name => argv[0] if !b

View File

@ -13,6 +13,7 @@ module Vagrant
# Parse the options
argv = parse_options(opts)
return if !argv
raise Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1
b = @env.boxes.find(argv[0])
raise Errors::BoxNotFound, :name => argv[0] if !b