This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch fix-build
in repository https://gitbox.apache.org/repos/asf/maven-gpg-plugin.git

commit 3b999e7b90840be6f7499b9bed3f876f82627070
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Mon Jun 29 23:47:36 2026 +0200

    Fix #322: Prevent MinGW/MSYS path conversion in Windows builds
    
    Add MSYS_NO_PATHCONV=1 environment variable to prevent MinGW/MSYS
    environments (like GitHub Actions Windows runners) from converting
    Windows paths with drive letters to relative paths.
    
    This resolves the issue where paths like D:\a\project\gnupg were
    being mangled to /current/working/dir/D:\a\project\gnupg, causing
    GPG to fail finding key files.
---
 src/main/java/org/apache/maven/plugins/gpg/GpgSigner.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/java/org/apache/maven/plugins/gpg/GpgSigner.java 
b/src/main/java/org/apache/maven/plugins/gpg/GpgSigner.java
index d63bd5f..bc2acc3 100644
--- a/src/main/java/org/apache/maven/plugins/gpg/GpgSigner.java
+++ b/src/main/java/org/apache/maven/plugins/gpg/GpgSigner.java
@@ -61,6 +61,8 @@ public class GpgSigner extends AbstractGpgSigner {
 
         Commandline cmd = new Commandline();
 
+        cmd.addEnvironment("MSYS_NO_PATHCONV", "1");
+
         if (executable != null && !executable.isEmpty()) {
             cmd.setExecutable(executable);
         } else {

Reply via email to