diff --git a/lib/module.js b/lib/module.js index 7d3f0f6c71d57b..871e7513cd5aa9 100644 --- a/lib/module.js +++ b/lib/module.js @@ -452,10 +452,11 @@ Module.runMain = function() { Module._initPaths = function() { const isWindows = process.platform === 'win32'; + var homeDir; if (isWindows) { - var homeDir = process.env.USERPROFILE; + homeDir = process.env.USERPROFILE; } else { - var homeDir = process.env.HOME; + homeDir = process.env.HOME; } var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];