From 86908eee58da0b2db1cca103ec5a5447c0bf524b Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Mon, 1 Jan 2024 21:28:42 +0100 Subject: [PATCH] Fix Windows name on WMI error (#1426) Before, netbird would exit and prevent the agent from starting if getting the system name using WMI was an issue. This change returns a default value in this case --- client/system/info_windows.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/system/info_windows.go b/client/system/info_windows.go index 69b4ad008..76b13bbc3 100644 --- a/client/system/info_windows.go +++ b/client/system/info_windows.go @@ -36,7 +36,8 @@ func getOSNameAndVersion() (string, string) { query := wmi.CreateQuery(&dst, "") err := wmi.Query(query, &dst) if err != nil { - log.Fatal(err) + log.Error(err) + return "Windows", getBuildVersion() } if len(dst) == 0 {