vault: keep copy loop from clobbering args

This commit is contained in:
Brad Stein 2026-01-14 21:24:16 -03:00
parent 8a750ac3ab
commit 9743064ad3
2 changed files with 4 additions and 6 deletions

View File

@ -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 "$@"

View File

@ -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 "$@"