mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-24 20:37:17 +00:00
Fail Immediately if Importing Accounts from Empty Directory (#6915)
* fail on import from empty directory * Merge refs/heads/master into fail-on-empty-dir
This commit is contained in:
parent
96fcb3a927
commit
6b4e4bcf96
@ -74,6 +74,9 @@ func ImportAccount(cliCtx *cli.Context) error {
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not read dir")
|
||||
}
|
||||
if len(files) == 0 {
|
||||
return fmt.Errorf("directory %s has no files, cannot import from it", keysDir)
|
||||
}
|
||||
for i := 0; i < len(files); i++ {
|
||||
if files[i].IsDir() {
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user