${arr[@]} with set -u throws 'unbound variable' when the array is empty.
Use ${arr[@]+"${arr[@]}"} which only expands if the array is set.
https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH
|
||
|---|---|---|
| .. | ||
| build.sh | ||
${arr[@]} with set -u throws 'unbound variable' when the array is empty.
Use ${arr[@]+"${arr[@]}"} which only expands if the array is set.
https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH
|
||
|---|---|---|
| .. | ||
| build.sh | ||