mirror of
https://github.com/octoleo/restic.git
synced 2024-11-11 07:41:03 +00:00
Merge pull request #3702 from MichaelEischer/extend-config-error
Print used key name if config fails to load
This commit is contained in:
commit
a059ef90f8
@ -593,7 +593,9 @@ func (r *Repository) SearchKey(ctx context.Context, password string, maxKeys int
|
|||||||
r.treePM.key = key.master
|
r.treePM.key = key.master
|
||||||
r.keyName = key.Name()
|
r.keyName = key.Name()
|
||||||
r.cfg, err = restic.LoadConfig(ctx, r)
|
r.cfg, err = restic.LoadConfig(ctx, r)
|
||||||
if err != nil {
|
if err == crypto.ErrUnauthenticated {
|
||||||
|
return errors.Fatalf("config or key %v is damaged: %v", key.Name(), err)
|
||||||
|
} else if err != nil {
|
||||||
return errors.Fatalf("config cannot be loaded: %v", err)
|
return errors.Fatalf("config cannot be loaded: %v", err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user