From 33dc20b5dc815b8c23b935379e681e891eb18804 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[@]}"}