OSDN Git Service

t/lib-gpg: fix gpgconf stderr redirect to /dev/null
authorTodd Zullinger <tmz@pobox.com>
Mon, 13 Nov 2017 21:07:45 +0000 (16:07 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Nov 2017 02:51:35 +0000 (11:51 +0900)
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>
t/lib-gpg.sh

index 43679a4..a5d3b2c 100755 (executable)
@@ -31,7 +31,7 @@ then
                chmod 0700 ./gpghome &&
                GNUPGHOME="$(pwd)/gpghome" &&
                export GNUPGHOME &&
-               (gpgconf --kill gpg-agent 2>&1 >/dev/null || : ) &&
+               (gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) &&
                gpg --homedir "${GNUPGHOME}" 2>/dev/null --import \
                        "$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
                gpg --homedir "${GNUPGHOME}" 2>/dev/null --import-ownertrust \