diff --git a/scripts/apm-pack-check-clean.sh b/scripts/apm-pack-check-clean.sh index d64c0e4..f960b2f 100755 --- a/scripts/apm-pack-check-clean.sh +++ b/scripts/apm-pack-check-clean.sh @@ -11,4 +11,6 @@ set -euo pipefail source "$(dirname "${BASH_SOURCE[0]}")/lib/apm.sh" 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