From 0719283e41da101636b43ab99f4ede615267b321 Mon Sep 17 00:00:00 2001 From: Mickael Jeanroy Date: Mon, 31 Oct 2022 13:42:00 +0100 Subject: [PATCH] refactor: use path#resolve instead of path#normalize --- src/license-plugin.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/license-plugin.js b/src/license-plugin.js index a668201e..0e1847b1 100644 --- a/src/license-plugin.js +++ b/src/license-plugin.js @@ -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