Fix Array out of bounds bug in build.func
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
This commit is contained in:
parent
b3fcb5addf
commit
55903a8d5e
@ -3035,8 +3035,11 @@ create_lxc_container() {
|
|||||||
msg_debug "Found ${#LOCAL_TEMPLATES[@]} local templates, ${#ONLINE_TEMPLATES[@]} online templates"
|
msg_debug "Found ${#LOCAL_TEMPLATES[@]} local templates, ${#ONLINE_TEMPLATES[@]} online templates"
|
||||||
if [[ ${#ONLINE_TEMPLATES[@]} -gt 0 ]]; then
|
if [[ ${#ONLINE_TEMPLATES[@]} -gt 0 ]]; then
|
||||||
msg_debug "First 3 online templates:"
|
msg_debug "First 3 online templates:"
|
||||||
for i in {0..2}; do
|
count=0
|
||||||
[[ -n "${ONLINE_TEMPLATES[$i]}" ]] && msg_debug " [$i]: ${ONLINE_TEMPLATES[$i]}"
|
for idx in "${!ONLINE_TEMPLATES[@]}"; do
|
||||||
|
msg_debug " [$idx]: ${ONLINE_TEMPLATES[$idx]}"
|
||||||
|
((count++))
|
||||||
|
[[ $count -ge 3 ]] && break
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_debug "ONLINE_TEMPLATE='$ONLINE_TEMPLATE'"
|
msg_debug "ONLINE_TEMPLATE='$ONLINE_TEMPLATE'"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user