From 57481e3dd7b8420613d2adbc3fafa4c419b18203 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Sat, 29 Jan 2022 14:21:41 +0000 Subject: [PATCH] fix(cyberghost): compat log if `COUNTRY` is empty --- internal/configuration/sources/env/serverselection.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/configuration/sources/env/serverselection.go b/internal/configuration/sources/env/serverselection.go index 8dd85d75..b2855c18 100644 --- a/internal/configuration/sources/env/serverselection.go +++ b/internal/configuration/sources/env/serverselection.go @@ -28,8 +28,10 @@ func (r *Reader) readServerSelection(vpnProvider, vpnType string) ( countriesCSV := os.Getenv("COUNTRY") if vpnProvider == constants.Cyberghost && countriesCSV == "" { // Retro-compatibility - r.onRetroActive("REGION", "COUNTRY") countriesCSV = os.Getenv("REGION") + if countriesCSV != "" { + r.onRetroActive("REGION", "COUNTRY") + } } if countriesCSV != "" { ss.Countries = lowerAndSplit(countriesCSV)