From d08939ba381430dba99e37813fb87325226ca933 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Thu, 27 Oct 2022 15:00:36 +0200 Subject: [PATCH] chg: dev: no need to check constraints on infered relation when running action Signed-off-by: Valentin Lab --- bin/compose-core | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/compose-core b/bin/compose-core index 8cfd251..0561d48 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -3805,7 +3805,7 @@ get_docker_charm_action_help() { local services service charm relation_name target_service relation_config \ target_charm services=($(get_compose_yml_content | shyaml keys 2>/dev/null)) - get_all_relations "${services[@]}" >/dev/null 2>&1 || exit 1 + NO_CONSTRAINT_CHECK=1 get_all_relations "${services[@]}" >/dev/null || return 1 for service in "${services[@]}"; do out=$( charm=$(get_service_charm "$service") || return 1 @@ -4303,7 +4303,7 @@ if [ -z "$is_docker_compose_action" -a "$action" ]; then ## Required by has_service_action array_read-0 services_args < <(printf "%s" "$COMPOSE_YML_CONTENT" | shyaml keys-0 2>/dev/null) - get_all_relations "${services_args[@]}" >/dev/null 2>&1 || exit 1 + NO_CONSTRAINT_CHECK=1 get_all_relations "${services_args[@]}" >/dev/null || exit 1 remainder_args=("${remainder_args[@]:1}") if has_service_action "$action_service" "$action" >/dev/null; then