From 9f0d4bf16d044d5e0d3a8e6b17c5eaa9b1bcbc39 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Thu, 5 May 2022 12:29:07 +0100 Subject: [PATCH] Respect '--vars=file' Changes to how 'vars' is located and sourced omitted the possibility that the vars file has been declared via '--vars'. Move the 'fi' to the correct location so that '--vars' is respected. Closes: #552 (Over-ruled, due to another, unrelated change) Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 4db2bb7..073b64e 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -2637,6 +2637,8 @@ Priority should be given to your PKI vars file: [ "$prog_vars" ] && vars="$prog_vars" [ "$pki_vars" ] && vars="$pki_vars" fi + # END: Find vars + fi # If $EASYRSA_NO_VARS is defined (not blank) then do not use vars # if $no_pki_required then no vars is required. @@ -2681,8 +2683,6 @@ Failed to source the vars file, remove any unsupported characters." warn "Move your vars file to your PKI folder, where it is safe!" fi fi - # END: Find vars - fi # Set defaults, preferring existing env-vars if present set_var EASYRSA "$PWD"