From 66f8083cc06bf29db7f1d0db0d7c6e60032879c9 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 21 May 2026 07:25:14 +0530 Subject: [PATCH] fix: fix remote_up script --- remote_up.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/remote_up.sh b/remote_up.sh index 1b01ef1..29dc784 100755 --- a/remote_up.sh +++ b/remote_up.sh @@ -66,7 +66,14 @@ else fi if [[ "$MODE" == "build" ]]; then - exec "${COMPOSE_CMD[@]}" --profile remote up -d --build --force-recreate "${EXTRA_ARGS[@]}" + CMD=("${COMPOSE_CMD[@]}" --profile remote up -d --build --force-recreate) else - exec "${COMPOSE_CMD[@]}" --profile remote up -d --pull always --force-recreate "${EXTRA_ARGS[@]}" + CMD=("${COMPOSE_CMD[@]}" --profile remote up -d --pull always --force-recreate) fi + +# Bash 3.2 on macOS treats "${empty_array[@]}" as unbound under `set -u`. +if (( ${#EXTRA_ARGS[@]} )); then + CMD+=("${EXTRA_ARGS[@]}") +fi + +exec "${CMD[@]}"