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:
Jonas Mueller 2019-08-07 17:27:04 +02:00 committed by Drew DeVault
parent 4478c6a4b7
commit f6df46d319

View file

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