POSIX-ify the GNUPGHOME variable #300
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When GnuPG is built for MSYS2 (e.g., as part of Git for Windows), it expects
the
GNUPGHOMEenvironment variable to contain a POSIX-style path(e.g.,
/c/Users/user/.gnupg). However, users often set this variable using aWindows-style path (e.g.,
C:\Users\user\.gnupg), which is the native formatfor GnuPG for Windows.
This discrepancy leads to MSYS2-based GnuPG failing to correctly locate its home
directory when running within an environment having the
GNUPGHOMEdefined inthe Windows-style, as the Windows path is not properly interpreted. This issue
prevents users from seamlessly sharing a single GnuPG home directory across
different GnuPG installations (native Windows build vs. MSYS2-based). 1 2
To resolve this, we posix-ify
GNUPGHOMEin a manner similar toSHELL. 3This change will allow MSYS2-based GnuPG to correctly interpret the
GNUPGHOMEvariable regardless of whether it's set with a Windows path, improving the
interoperability and user experience.
Issue 4 and 5 from git-for-windows should benefit from this change.
This addresses #297