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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user