Fixup error message when bind mount configs are nonexistent

This commit is contained in:
Peter Cai 2024-10-12 17:16:19 -04:00
parent d5543eeb1b
commit 6bab1e1c42

View file

@ -101,7 +101,7 @@ fi
# Extra bind mounts
bind_mount_var_name="EXTRA_BIND_MOUNTS_${1//-/_}"
if [[ "$(declare -p ${bind_mount_var_name})" =~ "declare -a" ]]; then
if [[ "$(declare -p ${bind_mount_var_name} 2>&1)" =~ "declare -a" ]]; then
bind_mount_var="${bind_mount_var_name}[@]"
for mount in "${!bind_mount_var}"; do
extra_args="$extra_args -v $mount"