Quote all variables where needed

This commit is contained in:
Daniel_I_Am 2022-05-17 13:39:59 +02:00
parent cd0d4c0dff
commit d2f570b4ef

View File

@ -228,18 +228,18 @@ EOS
if [ ! -z "$port" ] if [ ! -z "$port" ]
then then
run_command+=" -p $port" run_command+=" -p \"$port\""
fi fi
for volume in $volumes for volume in $volumes
do do
run_command+=" -v $volume" run_command+=" -v \"$volume\""
done done
for envvar in $envvars for envvar in $envvars
do do
run_command+=" -e \"$envvar\"" run_command+=" -e \"$envvar\""
done done
run_command+=" -w \"$workdir\" $image $cmd" run_command+=" -w \"$workdir\" \"$image\" $cmd"
eval $run_command eval $run_command
} }