command line arg values with spaces will be splitt in 2 values, but the value should pass through as is to the java process.
for example:
/usr/local/s2i/run --script="new String(payload)" --other=param
will pass 3 args ["new","String(payload)", "--other=param"] instead of two ["new String(payload)", "--other=param"]
the issue can be easily fixed by quoting the pass through args
if [ -f "${DEPLOYMENTS_DIR}/bin/run.sh" ]; then
echo "Starting the application using the bundled ${DEPLOYMENTS_DIR}/bin/run.sh ..."
exec ${DEPLOYMENTS_DIR}/bin/run.sh "$@" ${JAVA_ARGS} # change $args -> "$@"
else
echo "Starting the Java application using /opt/run-java/run-java.sh ..."
exec /opt/run-java/run-java.sh "$@" ${JAVA_ARGS} # change $args -> "$@"
fi
quoting the $args won't fix the issue because that would cause that all args ["--script="new String(payload)" --other=param"] will be passed as one to the java applicaton
command line arg values with spaces will be splitt in 2 values, but the value should pass through as is to the java process.
for example:
/usr/local/s2i/run --script="new String(payload)" --other=param
will pass 3 args ["new","String(payload)", "--other=param"] instead of two ["new String(payload)", "--other=param"]
the issue can be easily fixed by quoting the pass through args
quoting the $args won't fix the issue because that would cause that all args ["--script="new String(payload)" --other=param"] will be passed as one to the java applicaton
the same bug must be fixed in run-java.sh. see https://github.com/fabric8io-images/run-java-sh/issues/75
java/fish-pepper.yml
must be updated, once the new run-java.sh release is ready