Printing help due to invalid options should have error exit status
This commit is contained in:
parent
7eafb5fc1f
commit
fe012e800f
|
@ -48,8 +48,7 @@ module Vagrant
|
|||
opts.parse!(argv)
|
||||
return argv
|
||||
rescue OptionParser::InvalidOption
|
||||
puts opts.help
|
||||
return nil
|
||||
raise Errors::CLIInvalidOptions, :help => opts.help.chomp
|
||||
end
|
||||
|
||||
# Yields a VM for each target VM for the command.
|
||||
|
|
|
@ -128,9 +128,9 @@ module Vagrant
|
|||
error_key(:failed, "vagrant.actions.box.verify")
|
||||
end
|
||||
|
||||
class CLIMissingEnvironment < VagrantError
|
||||
class CLIInvalidOptions < VagrantError
|
||||
status_code(1)
|
||||
error_key(:cli_missing_env)
|
||||
error_key(:cli_invalid_options)
|
||||
end
|
||||
|
||||
class ConfigValidationFailed < VagrantError
|
||||
|
|
|
@ -26,6 +26,11 @@ en:
|
|||
puppetd_not_detected: |-
|
||||
The `puppetd` binary was not found on the VM is required for Puppet Server provisioning.
|
||||
Please verify that Puppet is installed and that the binary is available on the PATH.
|
||||
cli_invalid_options: |-
|
||||
An invalid option was specified. The help for this command
|
||||
is available below.
|
||||
|
||||
%{help}
|
||||
config_validation: |-
|
||||
There was a problem with the configuration of Vagrant. The error message(s)
|
||||
are printed below:
|
||||
|
|
Loading…
Reference in New Issue