Do not mask account errors.

This commit is contained in:
Jim McDonald
2023-03-07 13:50:50 +00:00
parent d016326779
commit e496fa1977

View File

@@ -52,7 +52,7 @@ func ParseAccount(ctx context.Context,
account, err := parseAccountFromSpecifier(ctx, accountStr, supplementary, unlock)
if err != nil {
// It is possible that this is actually a path to a keystore, so try that instead.
if _, err = os.Stat(accountStr); err == nil {
if _, statErr := os.Stat(accountStr); statErr == nil {
account, err = parseAccountFromKeystorePath(ctx, accountStr, supplementary, unlock)
}
}