Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

NODE_PATH parses on ':' instead of ';' #1349

Closed
beriberikix opened this issue Jul 15, 2011 · 10 comments
Closed

NODE_PATH parses on ':' instead of ';' #1349

beriberikix opened this issue Jul 15, 2011 · 10 comments

Comments

@beriberikix
Copy link

NODE_PATH fails on windows since absolute paths start with 'C:/' and currently does process.env.NODE_PATH.split(":"). PATH on windows should be delimited by ';'.

@felixge
Copy link

felixge commented Jul 15, 2011

@ry: You mentioned you want all plattform stuff in uv, is that also the case here? If so what would be the solution? A binding to split paths?

@isaacs
Copy link

isaacs commented Jul 15, 2011

It's a pretty trivial fix. isaacs/node@e78a626a6e32f5cc9cb2

@ry @piscisaureus @felixge Care to comment?

@felixge
Copy link

felixge commented Jul 17, 2011

I'm fine with the patch, it's nice and simple. @ry just mentioned he wants all plattform stuff in libuv, so it's his call I guess.

@piscisaureus
Copy link

@felixge
I think we have to make an exception for this. Going through the C++ layer for something simple like this seems stupid. Also many functions in node_lib/path.js already have a platform-specific implementation.

@isaacs
We might consider adding some 'constant' for this, e.g. require('path').PATH_SEPARATOR. This is also what php does -- although I always found the difference between PATH_SEPARATOR (: or ;) and DIR_SEPARATOR (\ or /) a bit confusing.

@ry
Copy link

ry commented Jul 17, 2011

yes, going through the c++ layer for this seems stupid. +1

@isaacs isaacs closed this as completed in 448eab2 Jul 17, 2011
@isaacs
Copy link

isaacs commented Jul 17, 2011

The ayes have it.

@TooTallNate
Copy link

Though still a +1 for require('path').PATH_SEPARATOR from me. Seems essential.

@DrPizza
Copy link

DrPizza commented Jul 18, 2011

Java also does a similar thing for path/directory separators. I think it would be a useful thing to expose to users.

@ry
Copy link

ry commented Jul 18, 2011

require('path').SEPARATOR sounds fine.

@DrPizza
Copy link

DrPizza commented Jul 18, 2011

It may be nice to have a filesystem separator too, though perhaps in a different module.

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

No branches or pull requests

7 participants