summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJonas Mueller <jonas-mueller@mailbox.org>2019-08-07 17:27:04 +0200
committerDrew DeVault <sir@cmpwn.com>2019-08-12 08:59:40 +0900
commitf6df46d31933a8d85a1d6c67de01a118bd1c63e2 (patch)
tree3d062dd5cb87215aa058f4d4826ba27dcdd70297
parent4478c6a4b7e0bc35211d4ab7c681d5d36563c274 (diff)
downloadaerc-f6df46d31933a8d85a1d6c67de01a118bd1c63e2.tar.gz
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.go1
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)
964e45c54f8a'>^
c4199646 ^
d55e7738 ^
ba6621b5 ^
895093b3 ^


ba6621b5 ^

762107fd ^
e4ac3c9e ^
ba6621b5 ^
c6343de7 ^
f5465e12 ^
cdf28227 ^
f5465e12 ^
e4ac3c9e ^


2564eb6f ^

f5465e12 ^
08a0eed6 ^
f5465e12 ^

3120f938 ^

490b26d0 ^




3350c34a ^
490b26d0 ^

3120f938 ^
754d813b ^
490b26d0 ^


78357b88 ^







3350c34a ^
754d813b ^
3350c34a ^

490b26d0 ^
3350c34a ^
490b26d0 ^


c6343de7 ^















78357b88 ^
c6343de7 ^






78357b88 ^
c6343de7 ^
78357b88 ^

c6343de7 ^
78357b88 ^
















c6343de7 ^









c762564b ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123