sindresorhus / find-up

Find a file or directory by walking up parent directories
MIT License
582 stars 40 forks source link

Windows compatible? #23

Closed Sidfate closed 5 years ago

Sidfate commented 6 years ago

Isn't this package compatible with windows?

findUp.sync('key.txt', { cwd: 'd:\\' }) always return null.

sholladay commented 6 years ago

Yes, this package supports Windows.

Does d:\key.txt exist for you? As in, key.txt is in the root directory? It will have to be for us to return non-null.

We have a pretty thorough test suite that is passing on our Windows CI and there are no known bugs.

Is there any chance you could submit a failing test?

Phothiabea commented 6 years ago

There seems to be at least a slight problem. As with the linked issue above me ^ usage will fail under Windows in Powershell and cmd, while working correctly under Windows WSL

Sidfate commented 6 years ago

@Linard11 yeah, I tried again, the same

question

balcsida commented 6 years ago

I tried to debug this but I did not encounter this bug. image Could you please point out if I did something wrong during my debug process? Also, here is my environment:

sholladay commented 6 years ago

Well, you should set the cwd to the root directory of a drive and see if you can find a file that is there in the root directory. I wouldn't expect the result to be any different, but that is supposed to be the setup needed to reproduce this.

sindresorhus commented 5 years ago

Closing for lack of evidence. Submit a failing test if anyone wants this to be looked more.