user_error(): Exit with known error directly to cleanup()

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2023-09-14 11:51:12 +01:00
parent 7684b975ca
commit 232a28d959
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -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