Skip to content

Commit

Permalink
Fix Windows name on WMI error (#1426)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mlsmaycon authored Jan 1, 2024
1 parent c1caec3 commit 86908ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/system/info_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 86908ee

Please sign in to comment.