maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNG-5858) mvn script fails to locate .mvn in current directory
Date Fri, 11 Sep 2015 23:32:47 GMT

    [ https://issues.apache.org/jira/browse/MNG-5858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14741733#comment-14741733
] 

ASF GitHub Bot commented on MNG-5858:
-------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/maven/pull/58


> mvn script fails to locate .mvn in current directory
> ----------------------------------------------------
>
>                 Key: MNG-5858
>                 URL: https://issues.apache.org/jira/browse/MNG-5858
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.3.3
>            Reporter: Dave Syer
>
> The while loop in the shell script where we look for the .mvn directory is wrong:
> {noformat}
> 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}"
> }
> {noformat}
> Should be
> {noformat}
> 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}"
> }
> {noformat}
> That way if the current directory contains .mvn the loop terminates immediately.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message