mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Address Shellcheck warning (SC2086) for $arguments in launch script
$arguments needs to be split on spaces so it can’t just be wrapped in quotes. This commit updates arguments to be an array that is then expanded ("{arguments[@]}"). The use of @ and double quotes means that it is expanded into all elements individually quoted. See gh-4866
This commit is contained in:
parent
27a81e1463
commit
3afd0c7b3b
@ -147,7 +147,7 @@ do_start() {
|
||||
chown "$run_user" "$pid_file"
|
||||
chown "$run_user" "$log_file"
|
||||
if [ "${useStartStopDaemon:-true}" = true ] && type start-stop-daemon > /dev/null 2>&1; then
|
||||
arguments="-Dsun.misc.URLClassPath.disableJarChecking=true $JAVA_OPTS -jar $jarfile $RUN_ARGS $*"
|
||||
arguments=(-Dsun.misc.URLClassPath.disableJarChecking=true $JAVA_OPTS -jar $jarfile $RUN_ARGS "$@")
|
||||
start-stop-daemon --start --quiet \
|
||||
--chuid "$run_user" \
|
||||
--name "$identity" \
|
||||
@ -155,7 +155,7 @@ do_start() {
|
||||
--background --no-close \
|
||||
--startas "$javaexe" \
|
||||
--chdir "$working_dir" \
|
||||
-- $arguments \
|
||||
-- "${arguments[@]}" \
|
||||
>> "$log_file" 2>&1
|
||||
await_file "$pid_file"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user