forked from TrueCloudLab/restic
Merge pull request #1667 from restic/improve-error-config
Return error message for config decryption failure
This commit is contained in:
commit
a410fa16a1
1 changed files with 4 additions and 1 deletions
|
@ -487,7 +487,10 @@ 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)
|
||||||
return err
|
if err != nil {
|
||||||
|
return errors.Fatalf("config cannot be loaded: %v", err)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init creates a new master key with the supplied password, initializes and
|
// Init creates a new master key with the supplied password, initializes and
|
||||||
|
|
Loading…
Reference in a new issue