From 4726f20f50b2aa387230f4fd22029337346efa9c Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Mon, 11 May 2026 21:30:15 +0200 Subject: [PATCH] fix(vm): use bash 3.2-safe empty array expansion in supervisor build script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit macOS ships bash 3.2, which treats empty array expansion ("${arr[@]}") as an unbound variable error under set -u. Unlike set -e, this error is not caught by if-constructs — it kills the shell immediately with no output, causing mise run vm:supervisor to fail silently. Use the ${arr[@]+"${arr[@]}"} idiom so the script works on both bash 3.2 (macOS default) and bash 4+. Signed-off-by: Florent Benoit --- tasks/scripts/vm/build-supervisor-bundle.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/scripts/vm/build-supervisor-bundle.sh b/tasks/scripts/vm/build-supervisor-bundle.sh index 90f5b517d..20d318845 100755 --- a/tasks/scripts/vm/build-supervisor-bundle.sh +++ b/tasks/scripts/vm/build-supervisor-bundle.sh @@ -134,11 +134,11 @@ run_supervisor_build() { fi if command -v cargo-zigbuild >/dev/null 2>&1; then - "${cargo_prefix[@]}" cargo zigbuild --release -p openshell-sandbox --target "${RUST_TARGET}" \ + ${cargo_prefix[@]+"${cargo_prefix[@]}"} cargo zigbuild --release -p openshell-sandbox --target "${RUST_TARGET}" \ --manifest-path "${ROOT}/Cargo.toml" else echo " cargo-zigbuild not found, falling back to cargo build..." - "${cargo_prefix[@]}" cargo build --release -p openshell-sandbox --target "${RUST_TARGET}" \ + ${cargo_prefix[@]+"${cargo_prefix[@]}"} cargo build --release -p openshell-sandbox --target "${RUST_TARGET}" \ --manifest-path "${ROOT}/Cargo.toml" fi }