Browse Source

fix: support of empty ``docker-compose`` struct in compose YAML

test
Valentin Lab 6 years ago
parent
commit
8cbaa5356b
  1. 3
      bin/compose-core

3
bin/compose-core

@ -840,9 +840,8 @@ _get_docker_compose_opts() {
compose_def="$(get_compose_service_def "$service")" || return 1 compose_def="$(get_compose_service_def "$service")" || return 1
master_service="$(get_top_master_service_for_service "$service")" master_service="$(get_top_master_service_for_service "$service")"
docker_compose_opts=$(echo "$compose_def" | shyaml get-value "docker-compose" 2>/dev/null)
if [ "$docker_compose_opts" ]; then
if docker_compose_opts=$(echo "$compose_def" | shyaml get-value -y "docker-compose" 2>/dev/null); then
yaml_key_val_str "$master_service" "$docker_compose_opts" yaml_key_val_str "$master_service" "$docker_compose_opts"
fi | tee "$cache_file" fi | tee "$cache_file"
if [ "${PIPESTATUS[0]}" != 0 ]; then if [ "${PIPESTATUS[0]}" != 0 ]; then

Loading…
Cancel
Save