diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-05-04 13:13:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-04 13:13:33 +0200 |
commit | dd3adcd08d561bf9af12a0e91de383ab0698a754 (patch) | |
tree | 507c88f60fdbe653fc41609bc2770afcff60ba0c /lib | |
parent | 16dafb17f40f51d888c4cbbcc8edfb4787030ef7 (diff) | |
parent | c65a3d1af94011fb4fdfc0ad28e0d762818923cc (diff) |
Merge pull request #1482 from matthiasbeyer/libimagrt/cli-validation
libimagrt: cli validation
Diffstat (limited to 'lib')
-rw-r--r-- | lib/core/libimagrt/src/runtime.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/core/libimagrt/src/runtime.rs b/lib/core/libimagrt/src/runtime.rs index 093bd3cc..ed1bdc7e 100644 --- a/lib/core/libimagrt/src/runtime.rs +++ b/lib/core/libimagrt/src/runtime.rs @@ -175,7 +175,7 @@ impl<'a> Runtime<'a> { .arg(Arg::with_name(Runtime::arg_verbosity_name()) .short("v") .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) .takes_value(true) .possible_values(&["trace", "debug", "info", "warn", "error"]) @@ -184,7 +184,7 @@ impl<'a> Runtime<'a> { .arg(Arg::with_name(Runtime::arg_debugging_name()) .long("debug") - .help("Enables debugging output") + .help("Enables debugging output. Shortcut for '--verbose debug'") .required(false) .takes_value(false)) @@ -198,6 +198,7 @@ impl<'a> Runtime<'a> { .long("config") .help("Path to alternative config file") .required(false) + .validator(::libimagutil::cli_validators::is_existing_path) .takes_value(true)) .arg(Arg::with_name(Runtime::arg_config_override_name()) @@ -210,12 +211,14 @@ impl<'a> Runtime<'a> { .long("rtp") .help("Alternative runtimepath") .required(false) + .validator(::libimagutil::cli_validators::is_directory) .takes_value(true)) .arg(Arg::with_name(Runtime::arg_storepath_name()) .long("store") .help("Alternative storepath. Must be specified as full path, can be outside of the RTP") .required(false) + .validator(::libimagutil::cli_validators::is_directory) .takes_value(true)) .arg(Arg::with_name(Runtime::arg_editor_name()) |