Browse Source

fix: dev: multiple typos corrected, an export on ``relation-target-compose-get`` fixed.

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

14
bin/compose

@ -259,7 +259,7 @@ export -f yaml_key_val_str
docker_has_image() {
local image="$1"
images=$(docker images -q "$image" 2>/dev/null) || {
err "docker images call has failled unexpectedly."
err "docker images call has failed unexpectedly."
return 1
}
[ "$images" ]
@ -787,7 +787,7 @@ get_docker_compose () {
declare -A entries
start_compilation=$SECONDS
debug "Compiling 'docker-compose.conf' base for $DARKYELLOW$@$NORMAL..."
debug "Compiling 'docker-compose.yml' base for $DARKYELLOW$@$NORMAL..."
for target_service in "$@"; do
start=$SECONDS
services=$(get_ordered_service_dependencies "$target_service") || return 1
@ -813,8 +813,8 @@ get_docker_compose () {
merge_yaml_str "${entries[@]}" > "$cache_file"
export _current_docker_compose="$(cat "$cache_file")"
echo "$_current_docker_compose"
debug " ..compilation of base 'docker-compose.conf' done $GRAY(in $((SECONDS - start_compilation))s)$NORMAL" || true
# debug " ** ${WHITE}docker-compose.conf${NORMAL}:"
debug " ..compilation of base 'docker-compose.yml' done $GRAY(in $((SECONDS - start_compilation))s)$NORMAL" || true
# debug " ** ${WHITE}docker-compose.yml${NORMAL}:"
# debug "$_current_docker_compose"
}
export -f get_docker_compose
@ -893,7 +893,7 @@ get_service_def () {
def=$(echo "$_current_docker_compose" | shyaml get-value "$service" 2>/dev/null)
if [ -z "$def" ]; then
err "No definition for service $DARKYELLOW$service$NORMAL in compiled 'docker-compose.conf'."
err "No definition for service $DARKYELLOW$service$NORMAL in compiled 'docker-compose.yml'."
return 1
fi
echo "$def"
@ -1134,7 +1134,7 @@ relation-target-compose-get () {
return 1
fi
}
export -f relation-base-compose-get
export -f relation-target-compose-get
relation-set () {
@ -2213,7 +2213,7 @@ esac
get_docker_compose $services >/dev/null || { ## precalculate variable \$_current_docker_compose
err "Fails to compile base 'docker-compose.conf'"
err "Fails to compile base 'docker-compose.yml'"
exit 1
}

Loading…
Cancel
Save