diff --git a/bin/compose-core b/bin/compose-core index ea6e425..562a6a6 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -1548,6 +1548,18 @@ yaml_get_interpret() { export -f yaml_get_interpret +options-get () { + local key="$1" out + service_def=$(get_compose_service_def "$SERVICE_NAME") || return 1 + if ! out=$(echo "$service_def" | shyaml -y get-value "options.$key" 2>/dev/null); then + err "The key $WHITE$key$NORMAL was not found in base service compose definition.." + return 1 + fi + echo "$out" | yaml_get_interpret +} +export -f options-get + + relation-base-compose-get () { local key="$1" out if ! out=$(echo "$RELATION_BASE_COMPOSE_DEF" | shyaml -y get-value "options.$key" 2>/dev/null); then