Merge pull request #1189 from WTIFS/master

Set key to lowercase in cmdsInfoCache.Get()
This commit is contained in:
Vladimir Mihailenco 2019-11-19 10:53:00 +02:00 committed by GitHub
commit eb64034d44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -2005,6 +2005,12 @@ func (c *cmdsInfoCache) Get() (map[string]*CommandInfo, error) {
if err != nil { if err != nil {
return err return err
} }
for key := range cmds {
lowerKey := internal.ToLower(key)
if key != lowerKey {
cmds[lowerKey] = cmds[key]
}
}
c.cmds = cmds c.cmds = cmds
return nil return nil
}) })