jbliznak commented on code in PR #3258:
URL: https://github.com/apache/maven-surefire/pull/3258#discussion_r2779121568
##########
surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java:
##########
@@ -365,15 +365,15 @@ public void shouldParseBusyboxHoursEtime() {
}
@Test
- public void shouldHaveSystemPathToWmicOnWindows() throws Exception {
+ public void shouldHaveSystemPathToPowerShellOnWindows() throws Exception {
assumeTrue(IS_OS_WINDOWS);
assumeThat(System.getenv("SystemRoot"), is(notNullValue()));
assumeThat(System.getenv("SystemRoot"), is(not("")));
- assumeTrue(new File(System.getenv("SystemRoot"),
"System32\\Wbem").isDirectory());
- assumeTrue(new File(System.getenv("SystemRoot"),
"System32\\Wbem\\wmic.exe").isFile());
- assertThat((Boolean) invokeMethod(PpidChecker.class,
"hasWmicStandardSystemPath"))
+ assumeTrue(new File(System.getenv("SystemRoot"),
"System32\\WindowsPowerShell\\v1.0").isDirectory());
Review Comment:
not a regular user myself but all googling suggests the location is always
the same even if the actual powershell version inside is different, probably to
keep compatibility.
at least one MS reference
https://learn.microsoft.com/en-us/windows/msix/psf/run-scripts-with-package-support-framework
64-bit computer:
64-bit executable:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
32-bit executable:
%SystemRoot%\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
32-bit computer:
32-bit executable:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]