Skip to content

Commit

Permalink
Ignore conflicting vars files for commands which do not require vars
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Sep 20, 2023
1 parent 0f1064e commit 3b4b5f3
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -5722,12 +5722,15 @@ The 'vars' file was not found:
[ "$e_pwd_vars" ] && \
found_msg="${found_msg}${NL} * Found pwd_vars : $pwd_vars"

user_error "\
# If command is not 'help' etc then Error out
[ "$ignore_vars" ] || user_error "\
Conflicting 'vars' files found:
$found_msg

Use option --vars=<path-to/FILE> to define the vars file
or remove the conflicting vars files."

verbose "vars_setup: Conflicting vars IGNORED"
esac
verbose "vars_setup: vars = '$vars'"

Expand Down Expand Up @@ -7280,10 +7283,11 @@ cmd="$1"
# Establish PKI and CA initialisation requirements
# This avoids unnecessary warnings and notices
case "$cmd" in
init-pki|clean-all|\
help|-h|--help|--usage|\
show-host|\
version|upgrade|'')
''|help|-h|--help|--usage|version|upgrade|show-host)
unset -v require_pki require_ca
ignore_vars=1
;;
init-pki|clean-all)
unset -v require_pki require_ca
;;
*)
Expand Down

0 comments on commit 3b4b5f3

Please sign in to comment.