diff --git a/account_manager/src/validator/create.rs b/account_manager/src/validator/create.rs index 8e96a0040..7d4340774 100644 --- a/account_manager/src/validator/create.rs +++ b/account_manager/src/validator/create.rs @@ -137,6 +137,18 @@ pub fn cli_run( let count: Option = clap_utils::parse_optional(matches, COUNT_FLAG)?; let at_most: Option = clap_utils::parse_optional(matches, AT_MOST_FLAG)?; + // The command will always fail if the wallet dir does not exist. + if !wallet_base_dir.exists() { + return Err(format!( + "No wallet directory at {:?}. Use the `lighthouse --network {} {} {} {}` command to create a wallet", + wallet_base_dir, + matches.value_of("network").unwrap_or(""), + crate::CMD, + crate::wallet::CMD, + crate::wallet::create::CMD + )); + } + ensure_dir_exists(&validator_dir)?; ensure_dir_exists(&secrets_dir)?;