From 1395cba6cec0fb9179b39c12274e13e66e935130 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 15 Mar 2010 08:07:33 -0700 Subject: [PATCH] Remove require.paths from process object --- src/node.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/node.js b/src/node.js index 858cd91a94..e2bf8b8aab 100644 --- a/src/node.js +++ b/src/node.js @@ -461,14 +461,14 @@ function existsSync (path) { -process.paths = []; +var modulePaths = []; if (process.env["HOME"]) { - process.paths.unshift(path.join(process.env["HOME"], ".node_libraries")); + modulePaths.unshift(path.join(process.env["HOME"], ".node_libraries")); } if (process.env["NODE_PATH"]) { - process.paths = process.env["NODE_PATH"].split(":").concat(process.paths); + modulePaths = process.env["NODE_PATH"].split(":").concat(modulePaths); } @@ -566,7 +566,7 @@ function resolveModulePath(request, parent) { } else { id = request; // debug("ABSOLUTE: id="+id); - paths = process.paths; + paths = modulePaths; } return [id, paths]; @@ -738,7 +738,7 @@ Module.prototype._compile = function (content, filename) { return loadModule(path, self); } - require.paths = process.paths; + require.paths = modulePaths; require.async = requireAsync; require.main = process.mainModule; require.registerExtension = registerExtension;