From d6e20577db13034a5130b0346decb2581be03230 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Fri, 7 Dec 2018 21:14:40 +0100 Subject: [PATCH] new: support of service names having dots (``.``) inside their name. --- bin/compose-core | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/compose-core b/bin/compose-core index 36d7984..949e979 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -996,7 +996,7 @@ _get_compose_service_def_cached () { touch "$cache_file" || return 1 return 0 fi - value=$(echo "$docker_compose" | shyaml get-value "$service" 2>/dev/null) + value=$(echo "$docker_compose" | shyaml get-value "${service//./\\.}" 2>/dev/null) [ "$value" == None ] && value="" if ! echo "$value" | shyaml get-value "charm" >/dev/null 2>&1; then if charm.exists "$service"; then @@ -1083,7 +1083,7 @@ get_service_def () { "\$_current_docker_compose has been calculated." fi - def=$(echo "$_current_docker_compose" | shyaml get-value "services.$service" 2>/dev/null) + def=$(echo "$_current_docker_compose" | shyaml get-value "services.${service//./\\.}" 2>/dev/null) if [ -z "$def" ]; then err "No definition for service $DARKYELLOW$service$NORMAL in compiled 'docker-compose.yml'." return 1