Skip to content

Commit eb64034

Browse files
authored
Merge pull request #1189 from WTIFS/master
Set key to lowercase in cmdsInfoCache.Get()
2 parents 206581a + b32ffae commit eb64034

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

command.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,6 +2005,12 @@ func (c *cmdsInfoCache) Get() (map[string]*CommandInfo, error) {
20052005
if err != nil {
20062006
return err
20072007
}
2008+
for key := range cmds {
2009+
lowerKey := internal.ToLower(key)
2010+
if key != lowerKey {
2011+
cmds[lowerKey] = cmds[key]
2012+
}
2013+
}
20082014
c.cmds = cmds
20092015
return nil
20102016
})

0 commit comments

Comments
 (0)