automation: avoid globbering the docker run args

containerize bash -c './configure && make' fails due to shell expansion.

Collect all arguments for the script and pass them verbatim to the
docker run command.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Andrew Cooper <andew.cooper3@citrix.com>
This commit is contained in:
Olaf Hering authored and Andrew Cooper committed 2021-07-09 13:28:52 +01:00
1 parent ea7f91ded5
commit 4905c2da20
1 file changed
+3 -3
+3 -3
View File
@@ -47,10 +47,10 @@ case "_${CONTAINER_UID0}" in
esac
# Save the commands for future use
cmd=$@
cmd=("$@")
# If no command was specified, just drop us into a shell if we're interactive
[ $# -eq 0 ] && tty -s && cmd="/bin/bash"
[ $# -eq 0 ] && tty -s && cmd=("/bin/bash")
# Are we in an interactive terminal?
tty -s && termint=t
@@ -104,4 +104,4 @@ exec ${docker_cmd} run \
${CONTAINER_ARGS} \
-${termint}i --rm -- \
${CONTAINER} \
${cmd}
"${cmd[@]}"
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.