fix(insights): get Windows version

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan 2024-12-21 14:54:14 -05:00 committed by Joe Stump
parent 9ba617e503
commit 90eacd3d66
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -8,7 +8,7 @@ import (
)
// Ex: Microsoft Windows [Version 10.0.26100.1742]
var winVerRegex = regexp.MustCompile(`Microsoft Windows \[Version ([\d\.]+)\]`)
var winVerRegex = regexp.MustCompile(`Microsoft Windows \[.+\s([\d\.]+)\]`)
func getOSVersion() (version string, _ string) {
cmd := exec.Command("cmd", "/c", "ver")