From 75ec543b4b2013f90e1e58206cbf5fa9f876f7fe Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sun, 6 Dec 2026 22:18:55 +0000 Subject: [PATCH] test(plugins): guard the consumer-neutral test's array expansion test-vale-wrap's bash 3.2 scan flags a bare "${arr[@]}" expansion under set -u. Use the guarded form the repo's other scripts use. Refs: #177 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi --- tests/test-plugin-content-consumer-neutral.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test-plugin-content-consumer-neutral.sh b/tests/test-plugin-content-consumer-neutral.sh index 8258129..d0f2b81 100755 --- a/tests/test-plugin-content-consumer-neutral.sh +++ b/tests/test-plugin-content-consumer-neutral.sh @@ -35,8 +35,9 @@ assert_absent() { fi dirs+=("plugins/$plugin/.apm") done - # grep exits 1 on no match, which is the passing case here. - hits="$(cd "$REPO_ROOT" && grep -rnI $flags -e "$pattern" -- "${dirs[@]}" || true)" + # grep exits 1 on no match, which is the passing case here. The guarded + # expansion keeps bash 3.2 happy under `set -u`. + hits="$(cd "$REPO_ROOT" && grep -rnI $flags -e "$pattern" -- ${dirs[@]+"${dirs[@]}"} || true)" if [[ -z "$hits" ]]; then pass "$label" else