mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-10-21 21:31:51 +00:00
Guard the account email in __initHome too
_process() calls __initHome directly once the option loop is over, and that sourcing of account.conf overwrote the address -m had just exported -- before any command function reaches _initpath. Guarding only _initpath was not enough: by then ACCOUNT_EMAIL already held the saved address, so it was saved and restored unchanged. Keep the live value across this sourcing as well.
This commit is contained in:
1 parent
31f06a4ecf
commit
427787cb8f
1 file changed
+6
@@ -3365,7 +3365,13 @@ __initHome() {
|
|||||||
|
|
||||||
if [ -z "$ACCOUNT_CONF_PATH" ]; then
|
if [ -z "$ACCOUNT_CONF_PATH" ]; then
|
||||||
if [ -f "$_DEFAULT_ACCOUNT_CONF_PATH" ]; then
|
if [ -f "$_DEFAULT_ACCOUNT_CONF_PATH" ]; then
|
||||||
|
#Same as in _initpath: keep the live ACCOUNT_EMAIL across the sourcing,
|
||||||
|
#so that the -m address _process() exported is not replaced by the
|
||||||
|
#saved one. _process() calls __initHome directly, after the option
|
||||||
|
#loop, so this is the sourcing that -m used to lose to.
|
||||||
|
_ih_account_email="$ACCOUNT_EMAIL"
|
||||||
. "$_DEFAULT_ACCOUNT_CONF_PATH"
|
. "$_DEFAULT_ACCOUNT_CONF_PATH"
|
||||||
|
ACCOUNT_EMAIL="$_ih_account_email"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||