Skip to content

Commit d2cd755

Browse files
chriscoolgitster
authored andcommitted
lib-gpg: allow tests with the GPGSM prereq first
When the 'GPG' prereq is lazily tested, `mkdir "$GNUPGHOME"` could fail if the "$GNUPGHOME" directory already exists. This can happen if the 'GPGSM' prereq has been lazily tested before as it uses `mkdir -p "$GNUPGHOME"`. To allow the GPGSM prereq to appear before the GPG prereq in some test scripts, let's use `mkdir -p "$GNUPGHOME"` when the 'GPG' prereq is lazily tested too. This will be useful in a following commit. Signed-off-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7798d18 commit d2cd755

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
@@ -38,7 +38,7 @@ test_lazy_prereq GPG '
3838
# To export ownertrust:
3939
# gpg --homedir /tmp/gpghome --export-ownertrust \
4040
# > lib-gpg/ownertrust
41-
mkdir "$GNUPGHOME" &&
41+
mkdir -p "$GNUPGHOME" &&
4242
chmod 0700 "$GNUPGHOME" &&
4343
(gpgconf --kill all || : ) &&
4444
gpg --homedir "${GNUPGHOME}" --import \

0 commit comments

Comments
 (0)