Skip to content
Permalink
Browse files

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: #4962
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
  • Loading branch information...
Trott authored and MylesBorins committed Jan 30, 2016
1 parent 0f3b8ca commit 9646d26ffdfd26373e9138215d8bf04390a551a9
Showing with 3 additions and 2 deletions.
  1. +3 −2 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')];

0 comments on commit 9646d26

Please sign in to comment.
You can’t perform that action at this time.