From 0067609601cd657f71fb29689f0cfa2fb71bf5cc Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Thu, 3 Nov 2022 15:31:03 +0100 Subject: [PATCH] fix: default value for ``constraint`` in relation definition of ``metadata.yml`` enforced on empty values. Signed-off-by: Valentin Lab --- bin/compose-core | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/compose-core b/bin/compose-core index 7ae5405..d32dac3 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -2611,7 +2611,8 @@ get_all_relations () { return 1 ;; 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 "required") required+=("$service" "$relation_name" "$relation_def")