Browse Source

chg: dev: replace ``echo`` with ``printf`` !minor

hostresources
Valentin Lab 6 years ago
parent
commit
0ad11cc9cc
  1. 7
      bin/compose-core

7
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

Loading…
Cancel
Save