feat(winreg): adjust return logic in enabled

This commit is contained in:
memcpy-rand-rand-rand 2021-11-29 10:17:10 +00:00 committed by Jan De Dobbeleer
parent c328513410
commit d87b147544

View file

@ -33,16 +33,16 @@ func (wr *winreg) enabled() bool {
var err error
wr.Value, err = wr.env.getWindowsRegistryKeyValue(registryPath, registryKey)
if err != nil {
if len(fallback) > 0 {
wr.Value = fallback
return true
}
return false
if err == nil {
return true
}
return true
if len(fallback) > 0 {
wr.Value = fallback
return true
}
return false
}
func (wr *winreg) string() string {