Skip to content

Commit c09eb44

Browse files
Trottrvagg
authored andcommitted
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 <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Roman Klauke <[email protected]>
1 parent 5a10fe9 commit c09eb44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/module.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,11 @@ Module.runMain = function() {
452452
Module._initPaths = function() {
453453
const isWindows = process.platform === 'win32';
454454

455+
var homeDir;
455456
if (isWindows) {
456-
var homeDir = process.env.USERPROFILE;
457+
homeDir = process.env.USERPROFILE;
457458
} else {
458-
var homeDir = process.env.HOME;
459+
homeDir = process.env.HOME;
459460
}
460461

461462
var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];

0 commit comments

Comments
 (0)