From 427787cb8f1406c38190c18a4e7fea5b2f27f6e9 Mon Sep 17 00:00:00 2001 From: neil Date: Sat, 26 Sep 2026 12:38:43 +0200 Subject: [PATCH] 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. --- acme.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/acme.sh b/acme.sh index e026b9c6..e276527a 100755 --- a/acme.sh +++ b/acme.sh @@ -3365,7 +3365,13 @@ __initHome() { if [ -z "$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" + ACCOUNT_EMAIL="$_ih_account_email" fi fi