This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-wrapper.git
The following commit(s) were added to refs/heads/master by this push: new 7af7d15 [MWRAPPER-146] Bad substitution on Windows if MVNW_REPOURL is set on script-only (#151) 7af7d15 is described below commit 7af7d15c28691c2e002e0400db48f2270f1bb3fb Author: Bruno Villegas <738759+jah...@users.noreply.github.com> AuthorDate: Mon Dec 16 09:48:52 2024 +0100 [MWRAPPER-146] Bad substitution on Windows if MVNW_REPOURL is set on script-only (#151) USE_MVND evaluation is incorrect, string substitution of distributionUrl is incorrect --- maven-wrapper-distribution/src/resources/only-mvnw.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maven-wrapper-distribution/src/resources/only-mvnw.cmd b/maven-wrapper-distribution/src/resources/only-mvnw.cmd index 4a878f3..881529f 100644 --- a/maven-wrapper-distribution/src/resources/only-mvnw.cmd +++ b/maven-wrapper-distribution/src/resources/only-mvnw.cmd @@ -73,8 +73,8 @@ switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { # apply MVNW_REPOURL and calculate MAVEN_HOME # maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> if ($env:MVNW_REPOURL) { - $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } - $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" + $MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')" } $distributionUrlName = $distributionUrl -replace '^.*/','' $distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''