From 298541792cc63fe3a90fa4219fa0f74e560739b6 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 7e3a1a0917..141ee18ddb 100644 --- a/lib/module.js +++ b/lib/module.js @@ -446,10 +446,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')];