Re: [PATCH v2 04/10] t/lib-gpg: fix setup of GNUPGHOME in MinGW
- From
James Liu <james@jamesliu.io>
- Date
- Oct 16, 2024, 05:59 UTC
- Message-ID
- <D4X017IIV17C.3G44QS1AYGJP@jamesliu.io>
- In-Reply-To
- <cc94f6fa64805e0bc45fc18445c3e99d2f5ca9ed.1728992306.git.ps@pks.im>
On Tue Oct 15, 2024 at 10:45 PM AEDT, Patrick Steinhardt wrote:
Show 10 quoted lines
> In "t/lib-gpg.sh" we set up the "GNUPGHOME" environment variable to > point to a test-specific directory. This is done by using "$PWD/gpghome" > as value, where "$PWD" is the current test's trash directory. > > This is broken for MinGW though because "$PWD" will use Windows-style > paths that contain drive letters. What we really want in this context is > a Unix-style path, which we can get by using `$(pwd)` instead. It is > somewhat puzzling that nobody ever hit this issue, but it may easily be > that nobody ever tests on Windows with GnuPG installed, which would make > us skip those tests.
Thanks for the explanation! I didn't know "$PWD" and "$(pwd)" would behave differently under MinGW.