Skip to content

Commit

Permalink
Properly forward missing pinentry errors
Browse files Browse the repository at this point in the history
Before running the following command without pinentry in PATH resulted
in: Login failed: Could not sync vault: decrypt: MAC mismatch

With this change the error is properly forwarded and displayed
$ ./goldwarden vault login --email me@example.com
Login failed: exec: "pinentry": executable file not found in $PATH
  • Loading branch information
SuperSandro2000 committed Mar 2, 2024
1 parent ce6cb05 commit fc5a1f7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions agent/systemauth/pinentry/pinentry.go
Expand Up @@ -42,8 +42,7 @@ func GetPassword(title string, description string) (string, error) {
return externalPinentry.GetPassword(title, description)
}

// return "", errors.New("Not implemented")
return password, nil
return password, err
}

func GetApproval(title string, description string) (bool, error) {
Expand All @@ -56,6 +55,5 @@ func GetApproval(title string, description string) (bool, error) {
return externalPinentry.GetApproval(title, description)
}

// return true, errors.New("Not implemented")
return approval, nil
return approval, err
}

0 comments on commit fc5a1f7

Please sign in to comment.