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
1 changed files with 1 additions and 0 deletions
|
@ -204,6 +204,7 @@ func parseCredential(cred, command string) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := exec.Command("sh", "-c", command)
|
cmd := exec.Command("sh", "-c", command)
|
||||||
|
cmd.Stdin = os.Stdin
|
||||||
output, err := cmd.Output()
|
output, err := cmd.Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("failed to read password: %s", err)
|
return "", fmt.Errorf("failed to read password: %s", err)
|
||||||
|
|
Loading…
Reference in a new issue