From e23dc8b7102820a095c893c87979ca7d4fb77522 Mon Sep 17 00:00:00 2001 From: Benjamin McLean Date: Wed, 28 Aug 2024 11:19:50 -0500 Subject: [PATCH 1/2] Update realpath.js to fix https://github.com/npm/cli/issues/7309 --- workspaces/arborist/lib/realpath.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspaces/arborist/lib/realpath.js b/workspaces/arborist/lib/realpath.js index 6e5ad9b77ba5a..71e7b4a96e735 100644 --- a/workspaces/arborist/lib/realpath.js +++ b/workspaces/arborist/lib/realpath.js @@ -28,7 +28,7 @@ const realpathCached = (path, rpcache, stcache, depth) => { } // if it's the root, then we know it's real - if (!base) { + if (!base || dir == path) { rpcache.set(dir, dir) return Promise.resolve(dir) } From 58ee84a7f78d88f3b7c8e38b0f0fea6bfca923ea Mon Sep 17 00:00:00 2001 From: Benjamin McLean Date: Wed, 28 Aug 2024 20:28:59 -0500 Subject: [PATCH 2/2] Update realpath.js should be === --- workspaces/arborist/lib/realpath.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspaces/arborist/lib/realpath.js b/workspaces/arborist/lib/realpath.js index 71e7b4a96e735..fe0fb4edd20cc 100644 --- a/workspaces/arborist/lib/realpath.js +++ b/workspaces/arborist/lib/realpath.js @@ -28,7 +28,7 @@ const realpathCached = (path, rpcache, stcache, depth) => { } // if it's the root, then we know it's real - if (!base || dir == path) { + if (!base || dir === path) { rpcache.set(dir, dir) return Promise.resolve(dir) }