From 109b16d4889a82afa80b044f0e73c704b75a4598 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Mon, 12 Mar 2012 17:24:39 -0700 Subject: [PATCH] repl: use path.resolve() for the module.filename Windows was seeing: "C:\\path\\to\\cwd/repl" --- lib/repl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/repl.js b/lib/repl.js index b522d7a2653..9c5feb281d1 100644 --- a/lib/repl.js +++ b/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);