mirror of https://github.com/nodejs/node.git
repl: use path.resolve() for the module.filename
Windows was seeing: "C:\\path\\to\\cwd/repl"pull/24503/head
parent
bcb0cc0b18
commit
109b16d488
|
@ -59,7 +59,7 @@ var context;
|
||||||
exports.disableColors = process.env.NODE_DISABLE_COLORS ? true : false;
|
exports.disableColors = process.env.NODE_DISABLE_COLORS ? true : false;
|
||||||
|
|
||||||
// hack for require.resolve("./relative") to work properly.
|
// hack for require.resolve("./relative") to work properly.
|
||||||
module.filename = process.cwd() + '/repl';
|
module.filename = path.resolve('repl');
|
||||||
|
|
||||||
// hack for repl require to work properly with node_modules folders
|
// hack for repl require to work properly with node_modules folders
|
||||||
module.paths = require('module')._nodeModulePaths(module.filename);
|
module.paths = require('module')._nodeModulePaths(module.filename);
|
||||||
|
|
Loading…
Reference in New Issue