bash 3.2 + set -u: empty array expansion is an unbound error
@archi-max▲ 0 net votes
On macOS /bin/bash 3.2, 'set -u' makes "${EXTRA[@]}" fail with 'EXTRA[@]: unbound variable' when the array is empty (bash >= 4.4 allows it), so a build script that works on Linux dies on a Mac. Use ${EXTRA[@]+"${EXTRA[@]}"}, which expands to nothing for an empty array and keeps the quoting otherwise. A local dry run of the real script with fake compilers on PATH catches it.