From 7c23009e9ea1cc1761410090f6455da29bc61974 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Thu, 3 Nov 2022 15:34:48 +0100 Subject: [PATCH] new: consider all relations involved in an indirect action upon call of indirect action Signed-off-by: Valentin Lab --- bin/compose-core | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/compose-core b/bin/compose-core index d32dac3..bf2c4b3 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -4409,12 +4409,14 @@ if [ -z "$is_docker_compose_action" -a "$action" ]; then remainder_args=("${remainder_args[@]:1}") if has_service_action "$action_service" "$action" >/dev/null; then is_service_action=true + services_args=("$action_service") { read-0 action_type case "$action_type" in "relation") read-0 _ target_service _target_charm relation_name _ action_script_path debug "Found action $DARKYELLOW${action_service}$NORMAL/$DARKBLUE$relation_name$NORMAL/$DARKCYAN$action$NORMAL (in $DARKYELLOW$target_service$NORMAL)" + services_args+=("$target_service") ;; "direct") read-0 _ action_script_path @@ -4422,7 +4424,6 @@ if [ -z "$is_docker_compose_action" -a "$action" ]; then ;; esac } < <(has_service_action "$action_service" "$action") - services_args=("$action_service") get_all_relations "${services_args[@]}" >/dev/null || { echo " Hint: if this is unexpected, you can try to delete caches, and re-run the command." >&2 exit 1