This is an automated email from the ASF dual-hosted git repository.

cstamas pushed a commit to branch maven-3.9.x
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/maven-3.9.x by this push:
     new 274f1e345e [MNG-8165] Align mvn.sh script with mvn.cmd (#1647)
274f1e345e is described below

commit 274f1e345edb7a0ea73beeca6131f686ad1f5843
Author: Tamas Cservenak <[email protected]>
AuthorDate: Tue Aug 13 09:11:33 2024 +0200

    [MNG-8165] Align mvn.sh script with mvn.cmd (#1647)
    
    As one does check for .mvn directory in FS root while other does not, stops 
one level before.
    
    ---
    
    https://issues.apache.org/jira/browse/MNG-8165
---
 apache-maven/src/bin/mvn | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index a3004f9179..7e1f0abbd8 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -127,11 +127,15 @@ find_maven_basedir() {
 (
   basedir=`find_file_argument_basedir "$@"`
   wdir="${basedir}"
-  while [ "$wdir" != '/' ] ; do
+  while :
+  do
     if [ -d "$wdir"/.mvn ] ; then
       basedir=$wdir
       break
     fi
+    if [ "$wdir" == '/' ] ; then
+      break
+    fi
     wdir=`cd "$wdir/.."; pwd`
   done
   echo "${basedir}"

Reply via email to