Skip to content

Commit

Permalink
lib: remove useless cwd in posix.resolve
Browse files Browse the repository at this point in the history
PR-URL: #23902
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
ZYSzys authored and MylesBorins committed Nov 27, 2018
1 parent c564a4a commit 82b196b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/path.js
Expand Up @@ -1156,16 +1156,13 @@ const posix = {
resolve: function resolve() {
var resolvedPath = '';
var resolvedAbsolute = false;
var cwd;

for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
var path;
if (i >= 0)
path = arguments[i];
else {
if (cwd === undefined)
cwd = process.cwd();
path = cwd;
path = process.cwd();
}

assertPath(path);
Expand Down

0 comments on commit 82b196b

Please sign in to comment.