Add aliases for validator-dir flags (#3034)

## Issue Addressed

#3020

## Proposed Changes

- Alias the `validators-dir` arg to `validator-dir` in the `validator_client` subcommand.
- Alias the `validator-dir` arg to `validators-dir` in the `account_manager validator` subcommand.
- Add test for the validator_client alias.
This commit is contained in:
Mac L
2022-02-22 03:09:02 +00:00
parent 5a0b049049
commit 696de58141
4 changed files with 17 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ pub mod modify;
pub mod recover;
pub mod slashing_protection;
use crate::VALIDATOR_DIR_FLAG;
use crate::{VALIDATOR_DIR_FLAG, VALIDATOR_DIR_FLAG_ALIAS};
use clap::{App, Arg, ArgMatches};
use directory::{parse_path_or_default_with_flag, DEFAULT_VALIDATOR_DIR};
use environment::Environment;
@@ -21,6 +21,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.arg(
Arg::with_name(VALIDATOR_DIR_FLAG)
.long(VALIDATOR_DIR_FLAG)
.alias(VALIDATOR_DIR_FLAG_ALIAS)
.value_name("VALIDATOR_DIRECTORY")
.help(
"The path to search for validator directories. \