bmatzelle / gow

Unix command line utilities installer for Windows.
https://github.com/bmatzelle/gow/wiki
6.57k stars 366 forks source link

which not reporting correct location #183

Open twhitbeck opened 9 years ago

twhitbeck commented 9 years ago

I created a file ls.bat and placed it in a directory on my path.

which ls reports

C:\Program Files (x86)\Gow\bin\ls.EXE

where ls reports

C:\Windows\System32\ls.bat
C:\Program Files (x86)\Gow\bin\ls.exe

If I execute ls, C:\Windows\System32\ls.bat is actually what is getting executed.

gs11 commented 9 years ago

This is actually the expected behaviour, works the same way on GNU/Linux. I think it grabs the first match on the path.