mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-29 20:10:56 -08:00
parent
ea610029b2
commit
8554fb66a6
|
@ -148,9 +148,12 @@ func (env *Shell) WindowsRegistryKeyValue(path string) (*WindowsRegistryValue, e
|
|||
return nil, err
|
||||
}
|
||||
|
||||
regKey := Base(env, regPath)
|
||||
if len(regKey) != 0 {
|
||||
regPath = strings.TrimSuffix(regPath, `\`+regKey)
|
||||
var regKey string
|
||||
if !strings.HasSuffix(regPath, `\`) {
|
||||
regKey = Base(env, regPath)
|
||||
if len(regKey) != 0 {
|
||||
regPath = strings.TrimSuffix(regPath, `\`+regKey)
|
||||
}
|
||||
}
|
||||
|
||||
var key registry.Key
|
||||
|
|
Loading…
Reference in a new issue