From c09eb44a5918daf5bf1c2fe60029352b72781e22 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 29 Jan 2016 19:45:20 -0800 Subject: [PATCH] module: refactor redeclared variable `homedir` was declared with `var` twice in the same scope in `lib/module.js`. This change makes it a single declaration. PR-URL: https://github.com/nodejs/node/pull/4962 Reviewed-By: Brian White Reviewed-By: Minwoo Jung Reviewed-By: Roman Klauke --- lib/module.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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')];