@matheusbsbs / matheus-bagliano / commits / 6c72121c34
Fork 0

tests(gpg): allow the gpg-agent to start on Windows

In Git for Windows' SDK, we use the MSYS2 version of OpenSSH, meaning that the `gpg-agent` will fail horribly when being passed a `--homedir` that contains colons. Previously, we did pass the Windows version of the absolute path, though, which starts in the drive letter followed by, you guessed it, a colon. Let's use the same trick found elsewhere in our test suite where `$PWD` is used to refer to the pseudo-Unix path (which works only within the MSYS2 Bash/OpenSSH/Perl/etc, as opposed to `$(pwd)` which refers to the Windows path that `git.exe` understands, too). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Mar 25, 2020 at 05:41 UTC 6c72121c346eb8999171585e50d6791a0dbc97fb
1 file changed +1 -1
t/lib-gpg.sh
+1 -1
@@ -29,7 +29,7 @@ then
29 # > lib-gpg/ownertrust
30 mkdir ./gpghome &&
31 chmod 0700 ./gpghome &&
32 - GNUPGHOME="$(pwd)/gpghome" &&
32 + GNUPGHOME="$PWD/gpghome" &&
33 export GNUPGHOME &&
34 (gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) &&
35 gpg --homedir "${GNUPGHOME}" 2>/dev/null --import \