You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/05/31 15:55:45 UTC

[GitHub] [maven-mvnd] digulla commented on issue #619: Problem when running in Cygwin with an existed env variable “JAVA_HOME”.

digulla commented on issue #619:
URL: https://github.com/apache/maven-mvnd/issues/619#issuecomment-1142317006

   My suggestion would be to check whether `cygpath` is on the PATH or detect cygwin using `uname -s`. If a path doesn't work, try to run it through `cygpath --windows ` and try again.
   
   Something like using this everywhere:
   
       File path = resolveLocalPath(...)
   
   and then having code like this in resolveLocalPath():
   
       if file.exists() return file;
       if (cygwin) { // cygwin
           String mightWork = runOSCommand("cygpath", "--windows", file.toString());
           File f = new File(mightWork);
           if (f.exists()) { return file)
       }
   
   `uname -s` returns `CYGWIN_NT-10.0-19042`. I suggest to check for `String.startsWith("CYGWIN")`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org