t/lib-gpg: fix gpgconf stderr redirect to /dev/null
In 29ff1f8f74 (t: lib-gpg: flush gpg agent on startup, 2017-07-20), a call to gpgconf was added to kill the gpg-agent. The intention was to ignore all output from the call, but the order of the redirection needs to be switched to ensure that both stdout and stderr are redirected to /dev/null. Without this, gpgconf from gnupg-2.0 releases would output 'gpgconf: invalid option "--kill"' each time it was called. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Todd Zullinger committed
Nov 13, 2017 at 16:07 UTC
4c180f60a47f250b7c75151f8536ba56c7f1a8e2
1 file changed
+1
-1
t/lib-gpg.sh
+1
-1
@@ -31,7 +31,7 @@ then
31
chmod 0700 ./gpghome &&
32
GNUPGHOME="$(pwd)/gpghome" &&
33
export GNUPGHOME &&
34
- (gpgconf --kill gpg-agent 2>&1 >/dev/null || : ) &&
34
+ (gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) &&
35
gpg --homedir "${GNUPGHOME}" 2>/dev/null --import \
36
"$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
37
gpg --homedir "${GNUPGHOME}" 2>/dev/null --import-ownertrust \