Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2019-02-08 06:17:45 +0300
committerJunio C Hamano <gitster@pobox.com>2019-02-08 21:01:39 +0300
commitddf3a1152d32cc950389c9cb9e7b7962e7e14f16 (patch)
treead0fb6bb42b6b71b7b66f057bd2c8531fc0b269a /t/lib-gpg.sh
parent98cdfbb84ad2ed6a2eb43dafa357a70a4b0a0fad (diff)
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>
Diffstat (limited to 't/lib-gpg.sh')
-rwxr-xr-xt/lib-gpg.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index 3fe02876c1..d90160eb0b 100755
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -60,7 +60,7 @@ then
gpgsm --homedir "${GNUPGHOME}" 2>/dev/null -K \
| grep fingerprint: | cut -d" " -f4 | tr -d '\n' > \
${GNUPGHOME}/trustlist.txt &&
- echo " S relax" >> ${GNUPGHOME}/trustlist.txt &&
+ echo " S relax" >>"${GNUPGHOME}/trustlist.txt" &&
(gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) &&
echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \
-u committer@example.com -o /dev/null --sign - 2>&1 &&