From 025f137f2898b80faa1f2d30d55c569955c66332 Mon Sep 17 00:00:00 2001 From: Alan Date: Sun, 10 May 2026 14:34:39 +0800 Subject: [PATCH] fix: guard empty CTL_BOOTSTRAP_ARGS expansion for bash 3.2 With set -u, bash 3.2 treats empty array expansion "\${CTL_BOOTSTRAP_ARGS[@]}" as an unbound variable. Use ${CTL_BOOTSTRAP_ARGS[@]+"..."} pattern to skip expansion when the array is empty. --- ctl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctl.sh b/ctl.sh index 62c2407d..c246131f 100755 --- a/ctl.sh +++ b/ctl.sh @@ -215,7 +215,7 @@ start_cmd() { : >> "${LOG_FILE}" ( cd "${REPO_ROOT}" - exec "${python_exe}" "${REPO_ROOT}/bootstrap.py" --no-browser --foreground --host "${CTL_HOST}" "${CTL_PORT}" "${CTL_BOOTSTRAP_ARGS[@]}" + exec "${python_exe}" "${REPO_ROOT}/bootstrap.py" --no-browser --foreground --host "${CTL_HOST}" "${CTL_PORT}" ${CTL_BOOTSTRAP_ARGS[@]+"${CTL_BOOTSTRAP_ARGS[@]}"} ) >> "${LOG_FILE}" 2>&1 & pid=$!