Browse Source

new: [compose-core] do not ignore ``get_compose_relations`` errors

cache-relation
Valentin Lab 10 months ago
parent
commit
c50f6d4c3c
  1. 8
      bin/compose-core

8
bin/compose-core

@ -2829,7 +2829,7 @@ get_all_relations () {
all_services=("$@") all_services=("$@")
while [ "${#all_services[@]}" != 0 ]; do while [ "${#all_services[@]}" != 0 ]; do
array_pop all_services service array_pop all_services service
while read-0 relation_name ts relation_config tech_dep; do
while read-0-err E relation_name ts relation_config tech_dep; do
[ "${without_relations[$service:$relation_name]}" ] && { [ "${without_relations[$service:$relation_name]}" ] && {
debug "Ignoring compose $DARKYELLOW$service$NORMAL --$DARKBLUE$relation_name$NORMAL--> ${DARKYELLOW}$ts$NORMAL" debug "Ignoring compose $DARKYELLOW$service$NORMAL --$DARKBLUE$relation_name$NORMAL--> ${DARKYELLOW}$ts$NORMAL"
continue continue
@ -2842,7 +2842,11 @@ get_all_relations () {
array_read-0 services_uses < <(_get_services_uses "$ts") array_read-0 services_uses < <(_get_services_uses "$ts")
all_services+=("$ts") all_services+=("$ts")
services[$ts]=1 services[$ts]=1
done < <(get_compose_relations "$service")
done < <(p-err get_compose_relations "$service")
if [ "$E" != 0 ]; then
err "Failed to get relations for $DARKYELLOW$service$NORMAL."
return 1
fi
done > "${cache_file}.wip" done > "${cache_file}.wip"
while true; do while true; do

Loading…
Cancel
Save