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/10 15:57:12 UTC

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

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