diff options
Diffstat (limited to 'bos-meta-attribute.sh')
-rw-r--r-- | bos-meta-attribute.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bos-meta-attribute.sh b/bos-meta-attribute.sh index 403414d..9d7a4dd 100644 --- a/bos-meta-attribute.sh +++ b/bos-meta-attribute.sh @@ -106,6 +106,8 @@ function bos/meta/attribute/get-value-into() { array) bos_meta_attribute_result=( "${bos_meta_attribute_store[@]}" ) ;; assoc) bos_meta_attribute_value_expr="$(declare -p "$bos_meta_attribute_store_name")" + # return if there's no value, otherwise the `eval` would fail + [[ "$bos_meta_attribute_value_expr" =~ = ]] || return 0 eval "bos_meta_attribute_result=${bos_meta_attribute_value_expr#*=}" ;; esac |