summary refs log tree commit diff stats
path: root/config
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 /config
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.
Diffstat (limited to 'config')
-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)
xit feature' href='/akspecs/ranger/commit/doc/cd-after-exit.txt?h=v1.7.1&id=e7f81766920a47bf4b126108a25ce92885682bc2'>e7f81766 ^
3fdfc107 ^
e7f81766 ^
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159