From 4c4791b5899afe585738ac0a15ba5c21d36952cc Mon Sep 17 00:00:00 2001 From: Liam Murphy <43807659+Liamolucko@users.noreply.github.com> Date: Wed, 6 Jan 2021 10:42:40 +1100 Subject: fix(std/node): resolve files in symlinked directories (#8840) --- std/node/module.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'std/node/module.ts') diff --git a/std/node/module.ts b/std/node/module.ts index f10fc2ca7..a7052668a 100644 --- a/std/node/module.ts +++ b/std/node/module.ts @@ -764,16 +764,7 @@ function tryFile(requestPath: string, _isMain: boolean): string | false { } function toRealPath(requestPath: string): string { - // Deno does not have realpath implemented yet. - let fullPath = requestPath; - while (true) { - try { - fullPath = Deno.readLinkSync(fullPath); - } catch { - break; - } - } - return path.resolve(requestPath); + return Deno.realPathSync(requestPath); } // Given a path, check if the file exists with any of the set extensions -- cgit v1.2.3