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 r-52 committed Jan 31, 2016
1 parent 27def4f commit 0c113e8
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 @@ -456,10 +456,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 0c113e8

Please sign in to comment.