diff options
author | Jonas Mueller <jonas-mueller@mailbox.org> | 2019-08-07 17:27:04 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-12 08:59:40 +0900 |
commit | f6df46d31933a8d85a1d6c67de01a118bd1c63e2 (patch) | |
tree | 3d062dd5cb87215aa058f4d4826ba27dcdd70297 | |
parent | 4478c6a4b7e0bc35211d4ab7c681d5d36563c274 (diff) |
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.
-rw-r--r-- | config/config.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go index bfcbecf..5736678 100644 --- a/config/config.go +++ b/config/config.go @@ -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) |