mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-29 20:10:56 -08:00
feat(winreg): adjust return logic in enabled
This commit is contained in:
parent
c328513410
commit
d87b147544
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue