Skip to content

Commit

Permalink
module: refactor redeclared variable
Browse files Browse the repository at this point in the history
`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 Myles Borins committed Mar 2, 2016
1 parent 1f81442 commit 2985417
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')];
Expand Down

0 comments on commit 2985417

Please sign in to comment.