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/10/09 21:24:46 UTC

[GitHub] [maven-invoker] iofit opened a new pull request, #55: [MSHARED-1150] - Add ps1 as detectable file type for PowerShell

iofit opened a new pull request, #55:
URL: https://github.com/apache/maven-invoker/pull/55

   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [X ] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
   


-- 
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


[GitHub] [maven-invoker] iofit commented on a diff in pull request #55: [MSHARED-1150] - Add ps1 as detectable file type for PowerShell

Posted by GitBox <gi...@apache.org>.
iofit commented on code in PR #55:
URL: https://github.com/apache/maven-invoker/pull/55#discussion_r991477666


##########
src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java:
##########
@@ -663,6 +663,12 @@ private File detectMavenExecutablePerOs( File baseDirectory, String executable )
             {
                 return executableFile;
             }
+
+            executableFile = new File( baseDirectory, executable + ".ps1" );
+            if ( executableFile.isFile() )
+            {
+                return executableFile;
+            }

Review Comment:
   I moved up ps1 then check for cmd and bat



-- 
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


[GitHub] [maven-invoker] slawekjaranowski merged pull request #55: [MSHARED-1150] Add ps1 as detectable file type for PowerShell

Posted by GitBox <gi...@apache.org>.
slawekjaranowski merged PR #55:
URL: https://github.com/apache/maven-invoker/pull/55


-- 
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


[GitHub] [maven-invoker] michael-o commented on a diff in pull request #55: [MSHARED-1150] - Add ps1 as detectable file type for PowerShell

Posted by GitBox <gi...@apache.org>.
michael-o commented on code in PR #55:
URL: https://github.com/apache/maven-invoker/pull/55#discussion_r991441221


##########
src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java:
##########
@@ -663,6 +663,12 @@ private File detectMavenExecutablePerOs( File baseDirectory, String executable )
             {
                 return executableFile;
             }
+
+            executableFile = new File( baseDirectory, executable + ".ps1" );
+            if ( executableFile.isFile() )
+            {
+                return executableFile;
+            }

Review Comment:
   I think this should come first since it is supposed to supersede both batch and cmd script, no?



##########
src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java:
##########
@@ -251,7 +251,7 @@ public void testShouldFindDummyMavenExecutable()
         File check;
         if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
         {
-            check = createDummyFile( dummyMavenHomeBin, "mvn.bat" );
+            check = createDummyFile( dummyMavenHomeBin, "mvn.ps1" );

Review Comment:
   Make sense



-- 
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


[GitHub] [maven-invoker] slawekjaranowski commented on a diff in pull request #55: [MSHARED-1150] - Add ps1 as detectable file type for PowerShell

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on code in PR #55:
URL: https://github.com/apache/maven-invoker/pull/55#discussion_r990969809


##########
src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java:
##########
@@ -251,7 +251,7 @@ public void testShouldFindDummyMavenExecutable()
         File check;
         if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
         {
-            check = createDummyFile( dummyMavenHomeBin, "mvn.bat" );
+            check = createDummyFile( dummyMavenHomeBin, "mvn.ps1" );

Review Comment:
   `.bat` extensions still exists in code, so I would like a new test for `.ps1` extension



-- 
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