From 3264163f6c9e46e0868f42f6a006e5d25d7b538e Mon Sep 17 00:00:00 2001 From: Raskaro <52407171+Raskaro@users.noreply.github.com> Date: Wed, 21 Aug 2019 09:47:13 +0200 Subject: [PATCH] Merge Pull Request #5 fix/windowsNTVersion into develop --- utils/osdetail/version_windows.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/osdetail/version_windows.go b/utils/osdetail/version_windows.go index 43bb0dc..1313e9b 100644 --- a/utils/osdetail/version_windows.go +++ b/utils/osdetail/version_windows.go @@ -3,6 +3,7 @@ package osdetail import ( "fmt" "regexp" + "strings" "sync" "github.com/hashicorp/go-version" @@ -29,6 +30,8 @@ func WindowsNTVersion() (string, error) { if !fetched { _, _, windowsNTVersion, err = host.PlatformInformation() + windowsNTVersion = strings.SplitN(windowsNTVersion, " ", 2)[0] + if err != nil { return "", fmt.Errorf("failed to obtain Windows-Version: %s", err) }