From f6df46d31933a8d85a1d6c67de01a118bd1c63e2 Mon Sep 17 00:00:00 2001 From: Jonas Mueller Date: Wed, 7 Aug 2019 17:27:04 +0200 Subject: 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. --- config/config.go | 1 + 1 file changed, 1 insertion(+) (limited to 'config') 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) -- cgit v1.2.3