You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2017/01/31 02:30:10 UTC

[12/17] maven git commit: [MNG-5852] mvn shell script invokes /bin/sh but requires Bash functions

[MNG-5852] mvn shell script invokes /bin/sh but requires Bash functions

'local' is not POSIX, but supported by most shells. However, it's not
supported by Solaris's /bin/sh, so use a subshell instead.

This closes #50.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/13510202
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/13510202
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/13510202

Branch: refs/heads/MNG-5878
Commit: 135102022763eaa62fa1d0125adab7ff207ef2f4
Parents: 1d9708a
Author: Joseph Walton <jo...@kafsemo.org>
Authored: Mon Jan 30 11:13:16 2017 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Mon Jan 30 12:56:36 2017 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/mvn | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/13510202/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 4a7f610..172f43b 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -190,8 +190,7 @@ fi
 # traverses directory structure from process work directory to filesystem root
 # first directory with .mvn subdirectory is considered project base directory
 find_maven_basedir() {
-  local basedir
-  local wdir
+(
   basedir="`pwd`"
   wdir="`pwd`"
   while [ "$wdir" != '/' ] ; do
@@ -202,6 +201,7 @@ find_maven_basedir() {
     wdir="`cd "$wdir/.."; pwd`"
   done
   echo "${basedir}"
+)
 }
 
 # concatenates all lines of a file