From c50f6d4c3c4e7feae53f5a0731f99609470e2a1d Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Fri, 23 Feb 2024 16:00:47 +0100 Subject: [PATCH] new: [compose-core] do not ignore ``get_compose_relations`` errors --- bin/compose-core | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/compose-core b/bin/compose-core index cc0c047..65e2119 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -2829,7 +2829,7 @@ get_all_relations () { all_services=("$@") while [ "${#all_services[@]}" != 0 ]; do 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]}" ] && { debug "Ignoring compose $DARKYELLOW$service$NORMAL --$DARKBLUE$relation_name$NORMAL--> ${DARKYELLOW}$ts$NORMAL" continue @@ -2842,7 +2842,11 @@ get_all_relations () { array_read-0 services_uses < <(_get_services_uses "$ts") all_services+=("$ts") 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" while true; do