From 232a28d95941187251720548541a5eb570fe8dad Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Thu, 14 Sep 2023 11:51:12 +0100 Subject: [PATCH] user_error(): Exit with known error directly to cleanup() Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index c2f7b6c..b77cb6c 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -611,7 +611,8 @@ EasyRSA version $EASYRSA_version Error ----- $1" - exit 1 + easyrsa_exit_with_error=1 + cleanup } # => user_error() # verbose information @@ -885,6 +886,7 @@ Temporary session not preserved." # -> confirm(): aborted # -> verify_cert(): verify failed --batch mode # -> check_serial_unique(): not unique --batch mode + # -> user_error(): User errors but not die() if [ "$easyrsa_exit_with_error" ]; then verbose "Exit: Known errors = true" exit 1