Skip to content

Commit 6a9122b

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
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 3d6c404 commit 6a9122b

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
@@ -446,10 +446,11 @@ Module.runMain = function() {
446446
Module._initPaths = function() {
447447
const isWindows = process.platform === 'win32';
448448

449+
var homeDir;
449450
if (isWindows) {
450-
var homeDir = process.env.USERPROFILE;
451+
homeDir = process.env.USERPROFILE;
451452
} else {
452-
var homeDir = process.env.HOME;
453+
homeDir = process.env.HOME;
453454
}
454455

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

0 commit comments

Comments
 (0)