npm / node-which

Like which(1) unix command. Find the first instance of an executable in the PATH.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't find executables in case-sensitive directory on Windows

Gudahtt opened this issue · comments

Windows now features per-directory case-sensitivity. This is explained here: https://blogs.msdn.microsoft.com/commandline/2018/02/28/per-directory-case-sensitivity-and-wsl/
A directory created in the Windows Subsystem for Linux will be case-sensitive by default.

This library will read the PathExt environment variable to find file extensions, and try appending them to the input path one-by-one until it finds a match. The file extensions listed in PathExt are all upper-case.
As a result, the isexe check will always return false when the file extension of the executable file is lower-case.