2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-01 08:30:49 +00:00

Return error message for config decryption failure

See #1663
This commit is contained in:
Alexander Neumann 2018-03-09 21:05:14 +01:00
parent 7f8e269891
commit b3e1089cf9

View File

@ -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