Close #1349 Delimit NODE_PATH with ; on Windows
This commit is contained in:
Родитель
93899cb0cb
Коммит
448eab2587
|
@ -235,7 +235,8 @@ in pseudocode of what require.resolve does:
|
|||
|
||||
If the `NODE_PATH` environment variable is set to a colon-delimited list
|
||||
of absolute paths, then node will search those paths for modules if they
|
||||
are not found elsewhere.
|
||||
are not found elsewhere. (Note: On Windows, `NODE_PATH` is delimited by
|
||||
semicolons instead of colons.)
|
||||
|
||||
Additionally, node will search in the following locations:
|
||||
|
||||
|
|
|
@ -481,7 +481,8 @@ Module._initPaths = function() {
|
|||
}
|
||||
|
||||
if (process.env['NODE_PATH']) {
|
||||
paths = process.env['NODE_PATH'].split(':').concat(paths);
|
||||
var splitter = process.platform === 'win32' ? ';' : ':';
|
||||
paths = process.env['NODE_PATH'].split(splitter).concat(paths);
|
||||
}
|
||||
|
||||
modulePaths = paths;
|
||||
|
|
Загрузка…
Ссылка в новой задаче