pan3793 commented on code in PR #8235:
URL: https://github.com/apache/hadoop/pull/8235#discussion_r2785475665
##########
start-build-env.sh:
##########
@@ -98,15 +102,15 @@ ENV HOME="${DOCKER_HOME_DIR}"
UserSpecificDocker
-#If this env varible is empty, docker will be started
+# If this env variable is empty, docker will be started
# in non interactive mode
DOCKER_INTERACTIVE_RUN=${DOCKER_INTERACTIVE_RUN-"-i -t"}
# By mapping the .m2 directory you can do an mvn install from
# within the container and use the result on your normal
# system. And this also is a significant speedup in subsequent
# builds because the dependencies are downloaded only once.
-docker run --rm=true $DOCKER_INTERACTIVE_RUN \
+docker run "${DOCKER_PLATFORM_ARGS[@]}" --rm=true ${DOCKER_INTERACTIVE_RUN} \
Review Comment:
I kept ·${DOCKER_INTERACTIVE_RUN}· unquoted because it's intentionally
designed to expand to multiple arguments `-i -t` or be empty. This is a
legitimate use case where word splitting is desired. Fix that need to convert
it to an array too, but that would require changing how it's set and used
throughout the script.
##########
start-build-env.sh:
##########
@@ -98,15 +102,15 @@ ENV HOME="${DOCKER_HOME_DIR}"
UserSpecificDocker
-#If this env varible is empty, docker will be started
+# If this env variable is empty, docker will be started
# in non interactive mode
DOCKER_INTERACTIVE_RUN=${DOCKER_INTERACTIVE_RUN-"-i -t"}
# By mapping the .m2 directory you can do an mvn install from
# within the container and use the result on your normal
# system. And this also is a significant speedup in subsequent
# builds because the dependencies are downloaded only once.
-docker run --rm=true $DOCKER_INTERACTIVE_RUN \
+docker run "${DOCKER_PLATFORM_ARGS[@]}" --rm=true ${DOCKER_INTERACTIVE_RUN} \
Review Comment:
I kept `${DOCKER_INTERACTIVE_RUN}` unquoted because it's intentionally
designed to expand to multiple arguments `-i -t` or be empty. This is a
legitimate use case where word splitting is desired. Fix that need to convert
it to an array too, but that would require changing how it's set and used
throughout the script.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]