Pass os stdin to credential command
This is neccessary for `gpg-agent` to display a prompt and get the key to unlock a given password. See https://todo.sr.ht/~sircmpwn/aerc2/250.
This commit is contained in:
parent
4478c6a4b7
commit
f6df46d319
|
@ -204,6 +204,7 @@ func parseCredential(cred, command string) (string, error) {
|
|||
}
|
||||
|
||||
cmd := exec.Command("sh", "-c", command)
|
||||
cmd.Stdin = os.Stdin
|
||||
output, err := cmd.Output()
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to read password: %s", err)
|
||||
|
|
Loading…
Reference in New Issue