[client] Fix/stuck connecting when can't access api.netbird.io (#5033)

- Connect on daemon start only if the file existed before
- fixed a bug that happened when the default profile config was removed, which would recreate it and reset the active profile to the default.
This commit is contained in:
Maycon Santos
2026-01-05 15:53:17 +03:00
committed by GitHub
parent 08b782d6ba
commit 07856f516c
4 changed files with 29 additions and 62 deletions

View File

@@ -685,7 +685,7 @@ func update(input ConfigInput) (*Config, error) {
return config, nil
}
// GetConfig read config file and return with Config. Errors out if it does not exist
// GetConfig read config file and return with Config and if it was created. Errors out if it does not exist
func GetConfig(configPath string) (*Config, error) {
return readConfig(configPath, false)
}