mirror of
https://github.com/versity/versitygw.git
synced 2026-07-29 19:42:57 +00:00
fix: docker entrypoint move VGW_ARGS before backend subcommand
Global flags must appear before the backend subcommand in the versitygw CLI. Previously VGW_ARGS was appended after the backend, causing global flags to be silently ignored. Reorder argument assembly to: VGW_ARGS <backend> VGW_BACKEND_ARG VGW_BACKEND_ARGS Fixes #2082
This commit is contained in:
@@ -32,7 +32,15 @@ case "$backend" in
|
||||
;;
|
||||
esac
|
||||
|
||||
set -- "$backend"
|
||||
# Global flags must precede the backend subcommand.
|
||||
if [ -n "${VGW_ARGS:-}" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
set -- ${VGW_ARGS}
|
||||
else
|
||||
set --
|
||||
fi
|
||||
|
||||
set -- "$@" "$backend"
|
||||
|
||||
if [ -n "${VGW_BACKEND_ARG:-}" ]; then
|
||||
set -- "$@" "$VGW_BACKEND_ARG"
|
||||
@@ -43,9 +51,4 @@ if [ -n "${VGW_BACKEND_ARGS:-}" ]; then
|
||||
set -- "$@" ${VGW_BACKEND_ARGS}
|
||||
fi
|
||||
|
||||
if [ -n "${VGW_ARGS:-}" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
set -- "$@" ${VGW_ARGS}
|
||||
fi
|
||||
|
||||
exec "$BIN" "$@"
|
||||
|
||||
Reference in New Issue
Block a user