diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-05-04 11:21:49 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2018-05-04 11:21:49 +0200 |
commit | c65a3d1af94011fb4fdfc0ad28e0d762818923cc (patch) | |
tree | 8191b22dc7cf821e339b43f2dbbb5015b0281f35 /lib | |
parent | 9bf3f6da1b48a62f2b93ed4d23a4a7e4e4840afe (diff) |
Add CLI validators in default CLI setup
Diffstat (limited to 'lib')
-rw-r--r-- | lib/core/libimagrt/src/runtime.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/core/libimagrt/src/runtime.rs b/lib/core/libimagrt/src/runtime.rs index 967f6661..ed1bdc7e 100644 --- a/lib/core/libimagrt/src/runtime.rs +++ b/lib/core/libimagrt/src/runtime.rs @@ -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()) |