Browse Source

fix: [postgres] display service name upon error when not find containers and running ``sql`` action

boris/docuseal
Valentin Lab 1 year ago
parent
commit
2f4e3ddf8a
  1. 4
      postgres/actions/relations/postgres-database/sql

4
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 \

Loading…
Cancel
Save