diff --git a/bin/compose-core b/bin/compose-core index d557575..321ec4c 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -3266,7 +3266,7 @@ get_healthy_container_ip_for_service () { if [ -z "$containers" ]; then err "No containers running for service $DARKYELLOW$service$NORMAL." - exit 1 + return 1 fi ## XXXvlab: taking first container is probably not a good idea @@ -3278,14 +3278,14 @@ get_healthy_container_ip_for_service () { if [ -z "$container_ip" ]; then err "Can't get container's IP. You should check health of" \ "${DARKYELLOW}$service${NORMAL}'s container." - exit 1 + return 1 fi wait_for_tcp_port "$container_network" "$container_ip:$port" "$timeout" || { err "TCP port of ${DARKYELLOW}$service${NORMAL}'s container doesn't seem open" echo " Please check that container is healthy. Here are last logs:" >&2 docker logs "$container" --tail=10 | prefix " ${GRAY}|${NORMAL} " >&2 - exit 1 + return 1 } info "Host/Port ${container_ip}:${port} checked ${GREEN}open${NORMAL}." echo "$container_network:$container_ip"