Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iswindows returns false in windows #2

Open
tetreum opened this issue Oct 23, 2018 · 2 comments
Open

iswindows returns false in windows #2

tetreum opened this issue Oct 23, 2018 · 2 comments
Labels

Comments

@tetreum
Copy link

tetreum commented Oct 23, 2018

I'm on windows 10 64bit -> process.platform == win32. But your code is:

https://github.com/jonschlinkert/is-invalid-path/blob/master/index.js#L11

const isWindows = (opts = {}) => process.platform !== 'win32' || opts.windows === true;

I had to change it to:

const isWindows = (opts = {}) => process.platform === 'win32' || opts.windows === true;

I'm confused to be the first to notice this :S

@doowb doowb added the bug label Oct 23, 2018
@doowb
Copy link
Collaborator

doowb commented Oct 23, 2018

Thanks, this definitely looks like a bug.

I'm confused to be the first to notice this :S

I think because this was introduced in a refactor and the major version was bumped, most of the people using this library are using the old version.

If you'd like to submit a PR with your change, that would be awesome! Otherwise, I'll try to get it updated soon.

@tetreum
Copy link
Author

tetreum commented Oct 23, 2018

Done!
I didn't create it before because i was really confused it was set like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants