1
0
Fork 0
mirror of synced 2024-06-18 18:34:51 +12:00

fix shell re-quoting in docker_entrypoint.sh so that quoted subcommands can be passed in

This commit is contained in:
Nick Sweeting 2024-01-04 15:10:10 -08:00
parent 83eede54da
commit 48c9a49d56

View file

@ -107,12 +107,12 @@ if [[ "$1" == /* || "$1" == "bash" || "$1" == "sh" || "$1" == "echo" || "$1" ==
# "docker run archivebox /venv/bin/ipython3"
# "docker run archivebox /bin/bash -c '...'"
# "docker run archivebox cat /VERSION.txt"
exec gosu "$PUID" bash -c "$*"
exec gosu "$PUID" bash -c "$(printf ' %q' "$@")"
else
# handle "docker run archivebox add some subcommand --with=args abc" by calling archivebox to run as args as CLI subcommand
# e.g. "docker run archivebox help"
# "docker run archivebox add --depth=1 https://example.com"
# "docker run archivebox manage createsupseruser"
# "docker run archivebox server 0.0.0.0:8000"
exec gosu "$PUID" bash -c "archivebox $*"
exec gosu "$PUID" bash -c "archivebox $(printf ' %q' "$@")"
fi