From 12560cef0f7c6b05d0efe862904eb401714bed9b Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Fri, 17 May 2024 22:05:03 +0100 Subject: [PATCH] force_set_var(): Allow emmpty value to unset variable, as intended Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 7498f3992..0dbb35ac2 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -4417,6 +4417,8 @@ force_set_var() { esac # Guard unset with '|| die', just in case unset -v "$1" || die "force_set_var - unset '$1'" + # Allow emmpty value to unset variable + [ "$2" ] || return 0 set_var "$1" "$2" && return die "force_set_var - set_var '$*'" } # => force_set_var()