From debf3474e73ea8a290b980cc86759d1b67aa84ae Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Tue, 18 Nov 2025 13:40:55 +0000 Subject: [PATCH] hotfix(protonvpn): fix retro-compatibility with `UPDATER_PROTONVPN_USERNAME` --- internal/configuration/settings/updater.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/configuration/settings/updater.go b/internal/configuration/settings/updater.go index 70a86995..d5183fd4 100644 --- a/internal/configuration/settings/updater.go +++ b/internal/configuration/settings/updater.go @@ -154,7 +154,12 @@ func (u *Updater) read(r *reader.Reader) (err error) { u.Providers = r.CSV("UPDATER_VPN_SERVICE_PROVIDERS") - u.ProtonEmail = r.Get("UPDATER_PROTONVPN_EMAIL", reader.RetroKeys("UPDATER_PROTONVPN_USERNAME")) + u.ProtonEmail = r.Get("UPDATER_PROTONVPN_EMAIL") + if u.ProtonEmail == nil { + protonUsername := r.String("UPDATER_PROTONVPN_USERNAME", reader.IsRetro("UPDATER_PROTONVPN_EMAIL")) + protonEmail := protonUsername + "@protonmail.com" + u.ProtonEmail = &protonEmail + } u.ProtonPassword = r.Get("UPDATER_PROTONVPN_PASSWORD") return nil