t/lib-gpg: quote path to ${GNUPGHOME}/trustlist.txt

When gpgsm is installed, lib-gpg.sh attempts to update trustlist.txt to relax the checking of some root certificate requirements. The path to "${GNUPGHOME}" contains spaces which cause an "ambiguous redirect" warning when bash is used to run the tests: $ bash t7030-verify-tag.sh /git/t/lib-gpg.sh: line 66: ${GNUPGHOME}/trustlist.txt: ambiguous redirect ok 1 - create signed tags ok 2 # skip create signed tags x509 (missing GPGSM) ... No warning is issued when using bash called as /bin/sh, dash, or mksh. Quote the path to ensure the redirect works as intended and sets the GPGSM prereq. While we're here, drop the space after ">>". Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Todd Zullinger committed Feb 7, 2019 at 22:17 UTC ddf3a1152d32cc950389c9cb9e7b7962e7e14f16
1 file changed +1 -1
t/lib-gpg.sh
+1 -1
@@ -60,7 +60,7 @@ then
60 gpgsm --homedir "${GNUPGHOME}" 2>/dev/null -K \
61 | grep fingerprint: | cut -d" " -f4 | tr -d '\n' > \
62 ${GNUPGHOME}/trustlist.txt &&
63 - echo " S relax" >> ${GNUPGHOME}/trustlist.txt &&
63 + echo " S relax" >>"${GNUPGHOME}/trustlist.txt" &&
64 (gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) &&
65 echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \
66 -u committer@example.com -o /dev/null --sign - 2>&1 &&