You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/09/29 11:48:28 UTC

[GitHub] [maven] michael-o commented on a change in pull request #556: [MNG-7270] Switch to shell alternative to "which"

michael-o commented on a change in pull request #556:
URL: https://github.com/apache/maven/pull/556#discussion_r718427758



##########
File path: apache-maven/src/assembly/shared/init
##########
@@ -20,7 +20,7 @@ if [ -n "$JAVA_HOME" ] ; then
     fi
   fi
 else
-  JAVACMD="`which java`"
+  JAVACMD="`\\unalias -a; unset -f command; command -v java`"

Review comment:
       * Do you assume as `unalias` could be an alias as well?
   * Why are you unset all alias? Do you assume `java(1)` to be an alias?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org