[MNG-6191] mvn -f complains about illegal readlink option under macOS
Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/15e1df15 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/15e1df15 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/15e1df15 Branch: refs/heads/MNG-6191 Commit: 15e1df156a214780ae6ba94e1828cbfb127763f5 Parents: 0baa423 Author: Karl Heinz Marbaise <[email protected]> Authored: Sat Mar 25 11:31:29 2017 +0100 Committer: Karl Heinz Marbaise <[email protected]> Committed: Tue Mar 28 19:14:55 2017 +0200 ---------------------------------------------------------------------- apache-maven/src/bin/mvn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven/blob/15e1df15/apache-maven/src/bin/mvn ---------------------------------------------------------------------- diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn index df62f68..a447c4b 100755 --- a/apache-maven/src/bin/mvn +++ b/apache-maven/src/bin/mvn @@ -142,7 +142,7 @@ find_file_argument_basedir() { for arg in "$@"; do if [ ${found_file_switch} -eq 1 ]; then if [ -f "${arg}" ]; then - basedir=$(dirname "$(readlink -f "${arg}")") + basedir="$(cd "$(dirname "${arg}")" && pwd -P)" if [ ! -d "${basedir}" ]; then echo "Directory ${basedir} extracted from the -f/--file command-line argument ${arg} does not exist" >&2 exit 1
