From cb4c8d7d79e4e4345ae13ca7cb1734be7b4117bd Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Sat, 16 Feb 2019 06:59:06 +0100 Subject: [PATCH] chg: dev: don't print service as it's own dep in debug message. --- bin/compose-core | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/compose-core b/bin/compose-core index 72fcd1e..de10c53 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -1100,12 +1100,17 @@ get_docker_compose () { debug "Compiling 'docker-compose.yml' base for ${DARKYELLOW}$*$NORMAL..." for target_service in "$@"; do start=$SECONDS - services=$(get_ordered_service_dependencies "$target_service") || { + services=($(get_ordered_service_dependencies "$target_service")) || { err "Failed to get dependencies for $DARKYELLOW$target_service$NORMAL" return 1 } - debug " $DARKYELLOW$target_service$NORMAL deps:$DARKYELLOW" $services "$NORMAL$GRAY(in $((SECONDS - start))s)$NORMAL" - for service in $services; do + + if [ "$DEBUG" ]; then + debug " $DARKYELLOW$target_service$NORMAL deps:$DARKYELLOW" \ + "${services[@]::$((${#services[@]} - 1))}" \ + "$NORMAL$GRAY(in $((SECONDS - start))s)$NORMAL" + fi + for service in "${services[@]}"; do if [ "${entries[$service]}" ]; then ## Prevent double inclusion of same service if this