From 9be65c363374ca3db680c1c4384e366ae5acc387 Mon Sep 17 00:00:00 2001 From: nikolayzakharov Date: Tue, 18 Aug 2026 15:54:44 +0200 Subject: [PATCH] Fix unit tests aborting on bash 3.2 Script hack/test.sh sets nounset and expands test_flags at line 27. Outside CI that array is empty, and bash 3.2 treats the expansion of an empty array as an unbound variable, so make verify aborts before it runs a test. macOS ships bash 3.2.57 as /bin/bash. Guard the expansion so it disappears when the array is empty. This matches the ${timeout_flag:+...} guard in the same line. --- hack/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/test.sh b/hack/test.sh index 10c78774..295ce866 100755 --- a/hack/test.sh +++ b/hack/test.sh @@ -24,4 +24,4 @@ else timeout_flag="-timeout=2m" fi -go test ${timeout_flag:+"$timeout_flag"} "$@" "${test_flags[@]}" +go test ${timeout_flag:+"$timeout_flag"} "$@" ${test_flags[@]+"${test_flags[@]}"}