From 0ad11cc9cc49e27fd615c69b998a45080b04459d Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Fri, 7 Dec 2018 21:16:11 +0100 Subject: [PATCH] chg: dev: replace ``echo`` with ``printf`` !minor --- bin/compose-core | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/compose-core b/bin/compose-core index 949e979..c0dcaf5 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -693,6 +693,7 @@ wait_docker_ip() { } export -f wait_docker_ip + wait_for_tcp_port() { local network=$1 host_port=$2 timeout=20 verb "Trying to connect to $host_port" @@ -1637,18 +1638,18 @@ _get_compose_relations_cached () { "str") target_service="$(echo "$relation_def" | shyaml get-value 2>/dev/null)" || return 1 tech_dep="$(get_service_relation_tech_dep "$target_service" "$relation_name")" || return 1 - echo -en "$relation_name\0$target_service\0\0$tech_dep\0" + printf "%s\0" "$relation_name" "$target_service" "" "$tech_dep" ;; "sequence") while read-0 target_service; do tech_dep="$(get_service_relation_tech_dep "$target_service" "$relation_name")" || return 1 - echo -en "$relation_name\0$target_service\0\0$tech_dep\0" + printf "%s\0" "$relation_name" "$target_service" "" "$tech_dep" done < <(echo "$relation_def" | shyaml get-values-0 2>/dev/null) ;; "struct") while read-0 target_service relation_config; do tech_dep="$(get_service_relation_tech_dep "$target_service" "$relation_name")" || return 1 - echo -en "$relation_name\0$target_service\0$relation_config\0$tech_dep\0" + printf "%s\0" "$relation_name" "$target_service" "$relation_config" "$tech_dep" done < <(echo "$relation_def" | shyaml key-values-0 2>/dev/null) ;; esac