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 rvagg committed Feb 8, 2016
1 parent 5a10fe9 commit c09eb44
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 @@ -452,10 +452,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 c09eb44

Please sign in to comment.