Repository: maven Updated Branches: refs/heads/MNG-6223 5b9f28530 -> 0eb934bc8 (forced update)
[MNG-6223] support -f path/to/dir when detecting .mvn Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/0eb934bc Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/0eb934bc Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/0eb934bc Branch: refs/heads/MNG-6223 Commit: 0eb934bc82cef0d5df38742344334ad94bc4b5ad Parents: f7d4bce Author: Hervé Boutemy <[email protected]> Authored: Sat May 6 18:15:42 2017 +0200 Committer: herve <herve@giga> Committed: Sat May 6 21:57:16 2017 +0200 ---------------------------------------------------------------------- apache-maven/src/bin/mvn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven/blob/0eb934bc/apache-maven/src/bin/mvn ---------------------------------------------------------------------- diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn index 623b5f2..eedd344 100755 --- a/apache-maven/src/bin/mvn +++ b/apache-maven/src/bin/mvn @@ -141,7 +141,9 @@ find_file_argument_basedir() { found_file_switch=0 for arg in "$@"; do if [ ${found_file_switch} -eq 1 ]; then - if [ -f "${arg}" ]; then + if [ -d "${arg}" ]; then + basedir=`cd "${arg}" && pwd -P` + elif [ -f "${arg}" ]; then basedir=`dirname "${arg}"` basedir=`cd "${basedir}" && pwd -P` if [ ! -d "${basedir}" ]; then
