diff --git a/deploy/webmail.sh b/deploy/webmail.sh index 9fc94b0..a77f358 100755 --- a/deploy/webmail.sh +++ b/deploy/webmail.sh @@ -363,8 +363,12 @@ cmd_up() { then re-run this command." fi detect_compose + # ${arr[@]+"${arr[@]}"} rather than plain "${arr[@]}": under `set -u`, bash + # 4.3 and older — which is what QuTS hero ships — treats expanding an EMPTY + # array as an unbound variable and aborts. The +-form expands to nothing at + # all when the array is empty, and is identical otherwise. # shellcheck disable=SC2086 - compose "${profile[@]}" up -d "${build[@]}" $COMPOSE_WAIT + compose ${profile[@]+"${profile[@]}"} up -d ${build[@]+"${build[@]}"} $COMPOSE_WAIT health_gate || die "services did not come up healthy — check: ./deploy/webmail.sh logs" record_version "${IMAGE_TAG:-local}" grn "up. open http://:${WEB_PORT:-8088}/"