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

ASF GitHub Bot commented on MWRAPPER-88:
----------------------------------------

gnodet commented on code in PR #79:
URL: https://github.com/apache/maven-wrapper/pull/79#discussion_r1063550049


##########
maven-wrapper-distribution/src/resources/mvnw:
##########
@@ -281,20 +286,21 @@ MAVEN_OPTS="$(concat_lines 
"$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
 # For Cygwin, switch paths to Windows format before running java
 if $cygwin; then
   [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+    JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
   [ -n "$CLASSPATH" ] &&
-    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+    CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
   [ -n "$MAVEN_PROJECTBASEDIR" ] &&
-    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+    MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
 fi
 
 # Provide a "standardized" way to retrieve the CLI args that will
 # work with both Windows and non-Windows executions.
-MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*"
 export MAVEN_CMD_LINE_ARGS
 
 WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
 
+# shellcheck disable=SC2086 # safe args
 exec "$JAVACMD" \
   $MAVEN_OPTS \
   $MAVEN_DEBUG_OPTS \

Review Comment:
   Are there targets that could possibly not support arrays ?





> mvnw is not POSIX compatible
> ----------------------------
>
>                 Key: MWRAPPER-88
>                 URL: https://issues.apache.org/jira/browse/MWRAPPER-88
>             Project: Maven Wrapper
>          Issue Type: Bug
>          Components: Maven Wrapper Scripts
>    Affects Versions: 3.1.1
>            Reporter: Benjamin Marwell
>            Assignee: Benjamin Marwell
>            Priority: Major
>              Labels: posix
>
> * POSIX scripts should not use bash-specific features
>  * Fix suggestions from shellcheck 
> ([https://github.com/apache/maven-wrapper/pull/74])



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to