Browse Source

fix: default value for ``constraint`` in relation definition of ``metadata.yml`` enforced on empty values.

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
cache-relation
Valentin Lab 2 years ago
parent
commit
0067609601
  1. 3
      bin/compose-core

3
bin/compose-core

@ -2611,7 +2611,8 @@ get_all_relations () {
return 1 return 1
;; ;;
esac esac
constraint=$(echo "$relation_def" | shyaml get-value constraint optional 2>/dev/null)
constraint=$(echo "$relation_def" | shyaml get-value constraint 2>/dev/null)
constraint=${constraint:-optional}
case "$constraint" in case "$constraint" in
"required") "required")
required+=("$service" "$relation_name" "$relation_def") required+=("$service" "$relation_name" "$relation_def")

Loading…
Cancel
Save