The following script is okay set -ue readonly -a a=('')
Yet, the following script fails with exit code 1 set -ue readonly -a a=() In my case, I would like to preserve a copy of all passed arguments: set -ue readonly -a ARGS=("${@}") If no arguments are passed then the script fails. It's surprising the error behavior diverges depending upon setting an empty array or non-empty array. *-James Thomas Moon*