Test for the correct number of arguments to box add
This commit is contained in:
parent
4252fe94de
commit
9fce04c2cd
|
@ -1,6 +1,6 @@
|
|||
## 0.9.3 (unreleased)
|
||||
|
||||
|
||||
- Proper error handling for not enough arguments to `box add`.
|
||||
|
||||
## 0.9.2 (January 20, 2012)
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ module Vagrant
|
|||
# Parse the options
|
||||
argv = parse_options(opts)
|
||||
return if !argv
|
||||
raise Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 2
|
||||
|
||||
# If we're force adding, then be sure to destroy any existing box if it
|
||||
# exists.
|
||||
|
|
|
@ -128,6 +128,11 @@ module Vagrant
|
|||
error_key(:failed, "vagrant.actions.box.verify")
|
||||
end
|
||||
|
||||
class CLIInvalidUsage < VagrantError
|
||||
status_code(69)
|
||||
error_key(:cli_invalid_usage)
|
||||
end
|
||||
|
||||
class CLIInvalidOptions < VagrantError
|
||||
status_code(1)
|
||||
error_key(:cli_invalid_options)
|
||||
|
|
|
@ -30,6 +30,11 @@ en:
|
|||
An invalid option was specified. The help for this command
|
||||
is available below.
|
||||
|
||||
%{help}
|
||||
cli_invalid_usage: |-
|
||||
This command was not invoked properly. The help for this command is
|
||||
available below.
|
||||
|
||||
%{help}
|
||||
config_validation: |-
|
||||
There was a problem with the configuration of Vagrant. The error message(s)
|
||||
|
|
Loading…
Reference in New Issue