mirror of
https://github.com/restic/restic.git
synced 2024-12-24 16:54:00 +00:00
Print used key name if config fails to load
This commit is contained in:
parent
7d55b4f95e
commit
c2aabb2686
1 changed files with 3 additions and 1 deletions
|
@ -593,7 +593,9 @@ func (r *Repository) SearchKey(ctx context.Context, password string, maxKeys int
|
|||
r.treePM.key = key.master
|
||||
r.keyName = key.Name()
|
||||
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 nil
|
||||
|
|
Loading…
Reference in a new issue