Browse Source

fix: dev: ensure to exit after error

raw-remaining-args
Valentin Lab 6 years ago
parent
commit
b0fc018f0a
  1. 18
      bin/compose

18
bin/compose

@ -678,6 +678,10 @@ get_docker_compose_links() {
done < <(get_compose_relations "$service") || return 1
merge_yaml_str "${deps[@]}" | tee "$cache_file"
if [ "${PIPESTATUS[0]}" != 0 ]; then
rm "$cache_file"
return 1
fi
}
@ -702,6 +706,10 @@ _get_docker_compose_opts() {
if [ "$docker_compose_opts" ]; then
yaml_key_val_str "$master_charm" "$docker_compose_opts"
fi | tee "$cache_file"
if [ "${PIPESTATUS[0]}" != 0 ]; then
rm "$cache_file"
return 1
fi
}
@ -745,6 +753,11 @@ _get_docker_compose_service_mixin() {
else
echo "$links_yaml"
fi | tee "$cache_file"
if [ "${PIPESTATUS[0]}" != 0 ]; then
rm "$cache_file"
return 1
fi
}
export -f _get_docker_compose_service_mixin
@ -820,6 +833,11 @@ _get_compose_service_def_cached () {
service_def_base="charm: $service"
value=$(echo "$docker_compose" | shyaml get-value "$service" 2>/dev/null)
merge_yaml <(echo "$service_def_base") <(echo "$value") | tee "$cache_file"
if [ "${PIPESTATUS[0]}" != 0 ]; then
rm "$cache_file"
return 1
fi
}
export -f _get_compose_service_def_cached

Loading…
Cancel
Save