mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 03:40:12 +08:00
Refactor doctor for windows
This commit is contained in:
parent
bf36b6a59d
commit
9ab06152c5
@ -17,9 +17,6 @@ func platformInfo() (*OS, error) {
|
||||
// Ignore errors as it isn't a showstopper
|
||||
key, _ := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE)
|
||||
|
||||
defer key.Close()
|
||||
|
||||
// Ignore errors as it isn't a showstopper
|
||||
productName, _, _ := key.GetStringValue("ProductName")
|
||||
currentBuild, _, _ := key.GetStringValue("CurrentBuildNumber")
|
||||
displayVersion, _, _ := key.GetStringValue("DisplayVersion")
|
||||
@ -29,5 +26,5 @@ func platformInfo() (*OS, error) {
|
||||
result.Version = fmt.Sprintf("%s (Build: %s)", releaseId, currentBuild)
|
||||
result.ID = displayVersion
|
||||
|
||||
return &result, nil
|
||||
return &result, key.Close()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user