tests/smime: consistently quote $GNUPGHOME
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 28 Apr 2020 18:57:12 +0000 (14:57 -0400)
committerDavid Bremner <david@tethera.net>
Thu, 30 Apr 2020 20:54:03 +0000 (17:54 -0300)
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
test/test-lib.sh

index 1ffedb25e305f8aab195d90533575c465a3849cc..31f37ed70bb908464ee4006fb96e586c4c2836b4 100644 (file)
@@ -132,13 +132,13 @@ add_gnupg_home ()
 add_gpgsm_home ()
 {
     local fpr
-    [ -d ${GNUPGHOME} ] && return
+    [ -d "$GNUPGHOME" ] && return
     _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; }
     at_exit_function _gnupg_exit
     mkdir -m 0700 "$GNUPGHOME"
     gpgsm --batch --no-tty --no-common-certs-import --disable-dirmngr --import < $NOTMUCH_SRCDIR/test/smime/test.crt >"$GNUPGHOME"/import.log 2>&1
     fpr=$(gpgsm --batch --list-key test_suite@notmuchmail.org | sed -n 's/.*fingerprint: //p')
-    echo "$fpr S relax" >> $GNUPGHOME/trustlist.txt
+    echo "$fpr S relax" >> "$GNUPGHOME/trustlist.txt"
     gpgsm --quiet --batch --no-tty --no-common-certs-import --disable-dirmngr --import < $NOTMUCH_SRCDIR/test/smime/ca.crt
     echo "4D:E0:FF:63:C0:E9:EC:01:29:11:C8:7A:EE:DA:3A:9A:7F:6E:C1:0D S" >> "$GNUPGHOME/trustlist.txt"
     test_debug "cat $GNUPGHOME/import.log"