Fixes #9880 - Jetty 12 - jetty.sh does not work on Ubuntu.

The problem was that when using environment the generation of the command line
via --dry-run was missing the "envs" argument.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2023-06-06 15:48:15 +02:00
parent 6b362c03a9
commit 30a161d1da
No known key found for this signature in database
GPG Key ID: 1677D141BCF3584D
1 changed files with 2 additions and 2 deletions

View File

@ -433,7 +433,7 @@ CYGWIN*) JETTY_START="`cygpath -w $JETTY_START`";;
esac
# Collect the dry-run (of opts,path,main,args) from the jetty.base configuration
JETTY_DRY_RUN=$("$JAVA" -jar "$JETTY_START" --dry-run=opts,path,main,args ${JETTY_ARGS[*]} ${JAVA_OPTIONS[*]})
JETTY_DRY_RUN=$("$JAVA" -jar "$JETTY_START" --dry-run=opts,path,main,args,envs ${JETTY_ARGS[*]} ${JAVA_OPTIONS[*]})
RUN_ARGS=($JETTY_SYS_PROPS ${JETTY_DRY_RUN[@]})
#####################################################
@ -492,7 +492,7 @@ case "$ACTION" in
touch "$JETTY_PID"
chown "$JETTY_USER" "$JETTY_PID"
# FIXME: Broken solution: wordsplitting, pathname expansion, arbitrary command execution, etc.
su - "$JETTY_USER" $SU_SHELL -c "
cd \"$JETTY_BASE\"
echo ${RUN_ARGS[*]} start-log-file=\"$JETTY_START_LOG\" | xargs ${JAVA} > /dev/null &