~sircmpwn/aerc

Pass os stdin to credential command v1 PROPOSED

Jonas Mueller
Jonas Mueller: 1
 Pass os stdin to credential command

 1 files changed, 1 insertions(+), 0 deletions(-)
Okay, fair enough that this is only run during the config read. I've
applied your patch, thanks!

To git.sr.ht:~sircmpwn/aerc
   a174941..f6df46d  master -> master
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/aerc/patches/7390/mbox | git am -3
Learn more about email & git

[PATCH] Pass os stdin to credential command Export this patch

Jonas Mueller
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(+)

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)
-- 
2.22.0
You should set up an out of band pinentry like pinentry-gtk or something
similar. This naive approach will break under many circumstances
because aerc is TUI-based.
View this thread in the archives