Skip to content

Commit 7443d4e

Browse files
marshalhayesslachiewicz
authored andcommitted
Allow m2 path to be hidden on Windows
1 parent 4ab5304 commit 7443d4e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

maven-wrapper-distribution/src/resources/only-mvnw.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ if (-not (Test-Path -Path $MAVEN_M2_PATH)) {
8989
}
9090

9191
$MAVEN_WRAPPER_DISTS = $null
92-
if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) {
92+
if ((Get-Item -Path $MAVEN_M2_PATH -Force).Target[0] -eq $null) {
9393
$MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists"
9494
} else {
95-
$MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists"
95+
$MAVEN_WRAPPER_DISTS = (Get-Item -Path $MAVEN_M2_PATH -Force).Target[0] + "/wrapper/dists"
9696
}
9797

9898
$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain"

0 commit comments

Comments
 (0)