We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba58b51 commit c3a543eCopy full SHA for c3a543e
lib/index.js
@@ -29,8 +29,13 @@ const getPathInfo = (cmd, {
29
]
30
31
if (isWindows) {
32
- const pathExtExe = optPathExt || ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)
33
- const pathExt = pathExtExe.split(optDelimiter)
+ const pathExtExe = optPathExt ||
+ ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)
34
+ const pathExt = pathExtExe.split(optDelimiter).reduce((acc, item) => {
35
+ acc.push(item)
36
+ acc.push(item.toLowerCase())
37
+ return acc
38
+ }, [])
39
if (cmd.includes('.') && pathExt[0] !== '') {
40
pathExt.unshift('')
41
}
0 commit comments