Skip to content

Commit

Permalink
[MNG-8165] Align mvn.sh script with mvn.cmd (#1648)
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 2a709dc commit cf2934b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apache-maven/src/assembly/shared/init
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,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 cf2934b

Please sign in to comment.