From 2f4e3ddf8a155d51577088b8f47ab42177dadc84 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Sat, 9 Sep 2023 16:25:58 +0200 Subject: [PATCH] fix: [postgres] display service name upon error when not find containers and running ``sql`` action --- postgres/actions/relations/postgres-database/sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/postgres/actions/relations/postgres-database/sql b/postgres/actions/relations/postgres-database/sql index 470936a..8bd5bdd 100755 --- a/postgres/actions/relations/postgres-database/sql +++ b/postgres/actions/relations/postgres-database/sql @@ -97,12 +97,10 @@ set -e containers="$(get_running_containers_for_service "$RELATION_TARGET_SERVICE")" if [ -z "$containers" ]; then - err "No containers running for service $DARKYELLOW$service$NORMAL." + err "No containers running for service $DARKYELLOW$RELATION_TARGET_SERVICE$NORMAL." exit 1 fi - - ## XXXvlab: taking first container is probably not a good idea container_id="$(echo "$containers" | head -n 1)" docker exec -i -u 0 \