diff --git a/bin/compose-core b/bin/compose-core index 7073dad..792d6fd 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -1266,8 +1266,13 @@ get_compose_service_def () { docker_compose=$(get_compose_yml_content) || return 1 result=$(_get_compose_service_def_cached "$service" "$docker_compose") || return 1 charm=$(echo "$result" | shyaml get-value charm 2>/dev/null) || return 1 - metadata=$(charm.metadata "$charm") || return 1 - if default_options=$(printf "%s" "$metadata" | shyaml -y -q get-value default-options); then + if charm.exists "$charm"; then + metadata=$(charm.metadata "$charm") || return 1 + else + err "Charm $DARKPINK$charm$NORMAL not found in charm-store." + return 1 + fi + if default_options=$(e "$metadata" | shyaml -y -q get-value default-options); then default_options=$(yaml_key_val_str "options" "$default_options") || return 1 result=$(merge_yaml_str "$default_options" "$result") || return 1 fi @@ -2164,7 +2169,7 @@ _get_services_uses() { for service in "$@"; do _get_service_uses "$service" | while read-0 rn rd; do - printf "%s\0" "$service" "$rn" "$rd" + p0 "$service" "$rn" "$rd" done [ "${PIPESTATUS[0]}" == 0 ] || { return 1