Skip to content

Commit ddf3a11

Browse files
tmzullingergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 98cdfbb commit ddf3a11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/lib-gpg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ then
6060
gpgsm --homedir "${GNUPGHOME}" 2>/dev/null -K \
6161
| grep fingerprint: | cut -d" " -f4 | tr -d '\n' > \
6262
${GNUPGHOME}/trustlist.txt &&
63-
echo " S relax" >> ${GNUPGHOME}/trustlist.txt &&
63+
echo " S relax" >>"${GNUPGHOME}/trustlist.txt" &&
6464
(gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) &&
6565
echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \
6666
-u [email protected] -o /dev/null --sign - 2>&1 &&

0 commit comments

Comments
 (0)