summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/which/lib/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/which/lib/index.js')
-rw-r--r--deps/npm/node_modules/which/lib/index.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/deps/npm/node_modules/which/lib/index.js b/deps/npm/node_modules/which/lib/index.js
index 8de3388baf..52e9ea6237 100644
--- a/deps/npm/node_modules/which/lib/index.js
+++ b/deps/npm/node_modules/which/lib/index.js
@@ -29,8 +29,13 @@ const getPathInfo = (cmd, {
]
if (isWindows) {
- const pathExtExe = optPathExt || ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)
- const pathExt = pathExtExe.split(optDelimiter)
+ const pathExtExe = optPathExt ||
+ ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)
+ const pathExt = pathExtExe.split(optDelimiter).reduce((acc, item) => {
+ acc.push(item)
+ acc.push(item.toLowerCase())
+ return acc
+ }, [])
if (cmd.includes('.') && pathExt[0] !== '') {
pathExt.unshift('')
}