Merge pull request #1482 from matthiasbeyer/libimagrt/cli-validation
libimagrt: cli validation
This commit is contained in:
commit
dd3adcd08d
1 changed files with 5 additions and 2 deletions
|
@ -175,7 +175,7 @@ impl<'a> Runtime<'a> {
|
||||||
.arg(Arg::with_name(Runtime::arg_verbosity_name())
|
.arg(Arg::with_name(Runtime::arg_verbosity_name())
|
||||||
.short("v")
|
.short("v")
|
||||||
.long("verbose")
|
.long("verbose")
|
||||||
.help("Enables verbosity, can be used to set log level to one of 'trace', 'debug', 'info', 'warn' or 'error'")
|
.help("Set log level")
|
||||||
.required(false)
|
.required(false)
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.possible_values(&["trace", "debug", "info", "warn", "error"])
|
.possible_values(&["trace", "debug", "info", "warn", "error"])
|
||||||
|
@ -184,7 +184,7 @@ impl<'a> Runtime<'a> {
|
||||||
|
|
||||||
.arg(Arg::with_name(Runtime::arg_debugging_name())
|
.arg(Arg::with_name(Runtime::arg_debugging_name())
|
||||||
.long("debug")
|
.long("debug")
|
||||||
.help("Enables debugging output")
|
.help("Enables debugging output. Shortcut for '--verbose debug'")
|
||||||
.required(false)
|
.required(false)
|
||||||
.takes_value(false))
|
.takes_value(false))
|
||||||
|
|
||||||
|
@ -198,6 +198,7 @@ impl<'a> Runtime<'a> {
|
||||||
.long("config")
|
.long("config")
|
||||||
.help("Path to alternative config file")
|
.help("Path to alternative config file")
|
||||||
.required(false)
|
.required(false)
|
||||||
|
.validator(::libimagutil::cli_validators::is_existing_path)
|
||||||
.takes_value(true))
|
.takes_value(true))
|
||||||
|
|
||||||
.arg(Arg::with_name(Runtime::arg_config_override_name())
|
.arg(Arg::with_name(Runtime::arg_config_override_name())
|
||||||
|
@ -210,12 +211,14 @@ impl<'a> Runtime<'a> {
|
||||||
.long("rtp")
|
.long("rtp")
|
||||||
.help("Alternative runtimepath")
|
.help("Alternative runtimepath")
|
||||||
.required(false)
|
.required(false)
|
||||||
|
.validator(::libimagutil::cli_validators::is_directory)
|
||||||
.takes_value(true))
|
.takes_value(true))
|
||||||
|
|
||||||
.arg(Arg::with_name(Runtime::arg_storepath_name())
|
.arg(Arg::with_name(Runtime::arg_storepath_name())
|
||||||
.long("store")
|
.long("store")
|
||||||
.help("Alternative storepath. Must be specified as full path, can be outside of the RTP")
|
.help("Alternative storepath. Must be specified as full path, can be outside of the RTP")
|
||||||
.required(false)
|
.required(false)
|
||||||
|
.validator(::libimagutil::cli_validators::is_directory)
|
||||||
.takes_value(true))
|
.takes_value(true))
|
||||||
|
|
||||||
.arg(Arg::with_name(Runtime::arg_editor_name())
|
.arg(Arg::with_name(Runtime::arg_editor_name())
|
||||||
|
|
Loading…
Reference in a new issue