Skip to content

Commit

Permalink
refactor: use path#resolve instead of path#normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeanroy committed Oct 31, 2022
1 parent 0bcc7f1 commit 0719283
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/license-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,8 @@ class LicensePlugin {
}

// Go up in the directory tree.
const newDir = path.normalize(path.join(dir, '..'));
if (newDir === '.') {
break;
}

this.debug(`going up in the directory tree: ${newDir}`);
dir = newDir;
dir = path.resolve(path.join(dir, '..'));
this.debug(`going up in the directory tree: ${dir}`);
}

// Update the cache
Expand Down

0 comments on commit 0719283

Please sign in to comment.