Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.3.3
-
None
-
None
Description
The while loop in the shell script where we look for the .mvn directory is wrong:
find_maven_basedir() { local basedir=$(pwd) local wdir=$(pwd) while [ "$wdir" != '/' ] ; do wdir=$(cd "$wdir/.."; pwd) if [ -d "$wdir"/.mvn ] ; then basedir=$wdir break fi done echo "${basedir}" }
Should be
find_maven_basedir() { local basedir=$(pwd) local wdir=$(pwd) while [ "$wdir" != '/' ] ; do if [ -d "$wdir"/.mvn ] ; then basedir=$wdir break fi wdir=$(cd "$wdir/.."; pwd) done echo "${basedir}" }
That way if the current directory contains .mvn the loop terminates immediately.