Browse Source

new: catch error earlier. !minor

raw-remaining-args
Valentin Lab 9 years ago
parent
commit
a16a806776
  1. 15
      bin/compose

15
bin/compose

@ -747,7 +747,10 @@ _get_docker_compose_service_mixin() {
return 0 return 0
fi fi
master_charm=$(get_top_master_charm_for_service "$service") || return 1
master_charm=$(get_top_master_charm_for_service "$service") || {
err "Failed to get top master charm for service $DARKYELLOW$service$NORMAL"
return 1
}
## The compose part ## The compose part
@ -794,7 +797,10 @@ get_docker_compose () {
debug "Compiling 'docker-compose.yml' base for $DARKYELLOW$@$NORMAL..." debug "Compiling 'docker-compose.yml' base for $DARKYELLOW$@$NORMAL..."
for target_service in "$@"; do for target_service in "$@"; do
start=$SECONDS start=$SECONDS
services=$(get_ordered_service_dependencies "$target_service") || return 1
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" debug " $DARKYELLOW$target_service$NORMAL deps:$DARKYELLOW" $services "$NORMAL$GRAY(in $((SECONDS - start))s)$NORMAL"
for service in $services; do for service in $services; do
@ -808,7 +814,10 @@ get_docker_compose () {
## mark the service as "loaded" as well as it's containers ## mark the service as "loaded" as well as it's containers
## if this is a subordinate service ## if this is a subordinate service
start_service=$SECONDS start_service=$SECONDS
entries[$service]=$(_get_docker_compose_service_mixin "$service") || return 1
entries[$service]=$(_get_docker_compose_service_mixin "$service") || {
err "Failed to get service mixin for $DARKYELLOW$service$NORMAL"
return 1
}
debug " Applied $DARKYELLOW$service$NORMAL charm metadata mixins $GRAY(in $((SECONDS - start_service))s)$NORMAL" debug " Applied $DARKYELLOW$service$NORMAL charm metadata mixins $GRAY(in $((SECONDS - start_service))s)$NORMAL"
done done
debug " ..finished all mixins for $DARKYELLOW$target_service$NORMAL $GRAY(in $((SECONDS - start))s)$NORMAL" debug " ..finished all mixins for $DARKYELLOW$target_service$NORMAL $GRAY(in $((SECONDS - start))s)$NORMAL"

Loading…
Cancel
Save