Skip to content

Commit

Permalink
Merge pull request #9 from SayHeyD/empty-key-directory
Browse files Browse the repository at this point in the history
Make error handling more eloquent when getting key files
  • Loading branch information
SayHeyD authored Aug 10, 2023
2 parents 54665db + 7bbca61 commit f947f33
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/key/key_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ func GetAvailableKeys(keyDirPath string) []*Key {
return nil
})
if err != nil {
log.Fatalf("readKeyFiles: %v", err)
log.Fatalf("reading key files: %v", err)
}

if keys == nil {
log.Fatalf("reading key files: No keys were found in the the key dir '%s%s'", keyDir, string(os.PathSeparator))
}

return keys
Expand Down

0 comments on commit f947f33

Please sign in to comment.