Skip to content

Commit

Permalink
[MNG-8165] Align mvn.sh script with mvn.cmd (#1647)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cstamas authored Aug 13, 2024
1 parent 1a787b0 commit 274f1e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apache-maven/src/bin/mvn
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 274f1e3

Please sign in to comment.