Browse Source

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 <mscdex@mscdex.net>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
v4.x
Rich Trott 9 years ago
committed by Myles Borins
parent
commit
298541792c
  1. 5
      lib/module.js

5
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')];

Loading…
Cancel
Save