Browse Source

repl: use path.resolve() for the module.filename

Windows was seeing: "C:\\path\\to\\cwd/repl"
v0.9.1-release
Nathan Rajlich 13 years ago
committed by Bert Belder
parent
commit
109b16d488
  1. 2
      lib/repl.js

2
lib/repl.js

@ -59,7 +59,7 @@ var context;
exports.disableColors = process.env.NODE_DISABLE_COLORS ? true : false;
// 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
module.paths = require('module')._nodeModulePaths(module.filename);

Loading…
Cancel
Save