From 2d590b8763beae0ee7f8e0dddf12f5b0dafdd598 Mon Sep 17 00:00:00 2001 From: Martin Lablans Date: Fri, 20 Dec 2024 11:59:42 +0100 Subject: [PATCH] Make assertVarsNotEmpty() more robust --- lib/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions.sh b/lib/functions.sh index 3fcae38..9f3a43f 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -116,7 +116,7 @@ assertVarsNotEmpty() { MISSING_VARS="" for VAR in $@; do - if [ -z "${!VAR}" ]; then + if [ -z "${VAR+x}" ] || [ -z "$VAR" ]; then MISSING_VARS+="$VAR " fi done