From 9743064ad350f42ee13e54e30ddee653652c7bcb Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Wed, 14 Jan 2026 21:24:16 -0300 Subject: [PATCH] vault: keep copy loop from clobbering args --- dockerfiles/vault-entrypoint.sh | 5 ++--- services/harbor/scripts/vault-entrypoint.sh | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dockerfiles/vault-entrypoint.sh b/dockerfiles/vault-entrypoint.sh index 8d6ea78..fa3b791 100644 --- a/dockerfiles/vault-entrypoint.sh +++ b/dockerfiles/vault-entrypoint.sh @@ -14,9 +14,7 @@ fi if [ -n "${VAULT_COPY_FILES:-}" ]; then old_ifs="$IFS" IFS=',' - set -- ${VAULT_COPY_FILES} - IFS="$old_ifs" - for pair in "$@"; do + for pair in ${VAULT_COPY_FILES}; do src="${pair%%:*}" dest="${pair#*:}" if [ -z "${src}" ] || [ -z "${dest}" ]; then @@ -30,6 +28,7 @@ if [ -n "${VAULT_COPY_FILES:-}" ]; then mkdir -p "$(dirname "${dest}")" cp "${src}" "${dest}" done + IFS="$old_ifs" fi exec "$@" diff --git a/services/harbor/scripts/vault-entrypoint.sh b/services/harbor/scripts/vault-entrypoint.sh index 8d6ea78..fa3b791 100644 --- a/services/harbor/scripts/vault-entrypoint.sh +++ b/services/harbor/scripts/vault-entrypoint.sh @@ -14,9 +14,7 @@ fi if [ -n "${VAULT_COPY_FILES:-}" ]; then old_ifs="$IFS" IFS=',' - set -- ${VAULT_COPY_FILES} - IFS="$old_ifs" - for pair in "$@"; do + for pair in ${VAULT_COPY_FILES}; do src="${pair%%:*}" dest="${pair#*:}" if [ -z "${src}" ] || [ -z "${dest}" ]; then @@ -30,6 +28,7 @@ if [ -n "${VAULT_COPY_FILES:-}" ]; then mkdir -p "$(dirname "${dest}")" cp "${src}" "${dest}" done + IFS="$old_ifs" fi exec "$@"