Skip to content

Commit b32ffae

Browse files
committed
set key to lower for cmdsInfoCache.Get()
1 parent 726ddef commit b32ffae

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
@@ -2006,6 +2006,12 @@ func (c *cmdsInfoCache) Get() (map[string]*CommandInfo, error) {
20062006
if err != nil {
20072007
return err
20082008
}
2009+
for key := range cmds {
2010+
lowerKey := internal.ToLower(key)
2011+
if key != lowerKey {
2012+
cmds[lowerKey] = cmds[key]
2013+
}
2014+
}
20092015
c.cmds = cmds
20102016
return nil
20112017
})

0 commit comments

Comments
 (0)