From 51d6fb375c362dc535861edb1597fc7b149249fd Mon Sep 17 00:00:00 2001 From: Prajwol Gyawali Date: Wed, 20 May 2026 16:03:09 +0545 Subject: [PATCH] fix(functional-tests): avoid unbound CARGO_ARGS under set -u `run_test.sh` runs with `set -u`. Expanding `"${CARGO_ARGS[@]}"` for an empty array triggers "unbound variable" on bash 3.2 (the default shell on macOS), so the native backend path failed before invoking cargo. Use the `${arr[@]+"${arr[@]}"}` idiom to expand only when the array is set. --- functional-tests/run_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functional-tests/run_test.sh b/functional-tests/run_test.sh index bd7420f2..5a09f5af 100755 --- a/functional-tests/run_test.sh +++ b/functional-tests/run_test.sh @@ -30,7 +30,7 @@ case "$ASM_PROVER_BACKEND" in esac pushd .. > /dev/null -cargo build --bin strata-asm-runner "${CARGO_ARGS[@]}" +cargo build --bin strata-asm-runner ${CARGO_ARGS[@]+"${CARGO_ARGS[@]}"} if [[ "$ASM_PROVER_BACKEND" == "sp1" ]]; then # Produces guest-builder/sp1/elfs/{asm,moho}.elf, which the runner reads at startup. cargo build -p strata-asm-sp1-guest-builder --release