fix(scripts): expand APM_CMD bash-3.2-safely in apm-pack-check-clean

The helper now seeds APM_CMD empty, and a bare "${APM_CMD[@]}" on an
array that can be empty fails under `set -u` on bash 3.2. The bash-4
construct scan in tests/test-vale-wrap.sh caught it at pre-push. Use the
guarded expansion that run_apm already uses.

Refs: #271

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-12-02 10:29:51 +00:00
1 parent b0977d4073
commit 126831e96f
1 file changed
+3 -1
+3 -1
View File
@@ -11,4 +11,6 @@ set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/lib/apm.sh" source "$(dirname "${BASH_SOURCE[0]}")/lib/apm.sh"
require_apm_version || exit 1 require_apm_version || exit 1
exec "${APM_CMD[@]}" pack --check-versions --check-clean --dry-run # The guarded expansion keeps bash 3.2 happy under `set -u`: the helper seeds
# APM_CMD empty, and require_apm_version has already refused an empty one.
exec ${APM_CMD[@]+"${APM_CMD[@]}"} pack --check-versions --check-clean --dry-run