mirror of
https://github.com/mitchell/selfpass.git
synced 2025-12-14 13:27:21 +00:00
Refactor error handling in prompt mode; add cred flag and reset func
This commit is contained in:
parent
84ea1cacdf
commit
633945b1d1
8 changed files with 72 additions and 33 deletions
|
|
@ -71,6 +71,7 @@ func (mgr *ConfigManager) OpenConfig() (output string, v *viper.Viper, err error
|
|||
if err == errConfigDecrypted {
|
||||
configDecrypted = true
|
||||
} else if err != nil && err.Error() == crypto.ErrAuthenticationFailed.Error() {
|
||||
mgr.masterpass = ""
|
||||
return output, nil, errors.New("incorrect masterpass")
|
||||
} else if err != nil {
|
||||
return output, nil, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue