Validator dir creation (#1746)

## Issue Addressed

Resolves #1744

## Proposed Changes

- Add `directory::ensure_dir_exists` to the `ValidatorDefinition::open_or_create` method 
- As @pawanjay176 suggested, making the `--validator-dir` non-global so users are forced to include the flag after the `validator` subcommand. Current behavior seems to be ignoring the flag if it comes after something like `validator import`

## Additional Info
N/A
This commit is contained in:
realbigsean
2020-10-08 21:01:32 +00:00
parent a67fa5f4a4
commit b69c63d486
5 changed files with 8 additions and 2 deletions

View File

@@ -26,7 +26,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
Defaults to ~/.lighthouse/{testnet}/validators",
)
.takes_value(true)
.global(true)
.conflicts_with("datadir"),
)
.subcommand(create::cli_app())