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 <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-05-05 12:29:07 +01:00
parent ecc7cb72d1
commit 9f0d4bf16d
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -2637,6 +2637,8 @@ Priority should be given to your PKI vars file:
[ "$prog_vars" ] && vars="$prog_vars" [ "$prog_vars" ] && vars="$prog_vars"
[ "$pki_vars" ] && vars="$pki_vars" [ "$pki_vars" ] && vars="$pki_vars"
fi fi
# END: Find vars
fi
# If $EASYRSA_NO_VARS is defined (not blank) then do not use vars # If $EASYRSA_NO_VARS is defined (not blank) then do not use vars
# if $no_pki_required then no vars is required. # 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!" warn "Move your vars file to your PKI folder, where it is safe!"
fi fi
fi fi
# END: Find vars
fi
# Set defaults, preferring existing env-vars if present # Set defaults, preferring existing env-vars if present
set_var EASYRSA "$PWD" set_var EASYRSA "$PWD"