_varIsEmpty_: allow passing empty variables when using set nounset

This commit is contained in:
Nathaniel Landau
2021-10-24 22:48:04 -04:00
parent 1306924c91
commit a753723ce8

View File

@@ -343,7 +343,7 @@ _varIsEmpty_() {
# USAGE
# _varIsEmpty_ "${var}"
[[ -z ${1} || ${1} == "null" ]] && return 0 || return 1
[[ -z ${1:-} || ${1:-} == "null" ]] && return 0 || return 1
}
_isIPv6_() {