2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-05 12:57:53 +00:00

Merge pull request #1667 from restic/improve-error-config

Return error message for config decryption failure
This commit is contained in:
Alexander Neumann 2018-03-10 20:34:25 +01:00
commit a410fa16a1

View File

@ -487,7 +487,10 @@ 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)
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