build.sh: fix empty array expansion under set -u
${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
This commit is contained in:
parent
efca2b5941
commit
54ddc0d856
1 changed files with 1 additions and 1 deletions
|
|
@ -99,7 +99,7 @@ fi
|
|||
docker run --detach \
|
||||
--name "$CONTAINER_NAME" \
|
||||
--network hiy-net \
|
||||
"${ENV_FILE_ARG[@]}" \
|
||||
"${ENV_FILE_ARG[@]+"${ENV_FILE_ARG[@]}"}" \
|
||||
--expose "$PORT" \
|
||||
--label "hiy.app=${APP_ID}" \
|
||||
--label "hiy.port=${PORT}" \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue