summaryrefslogtreecommitdiff
path: root/std/node/module.ts
diff options
context:
space:
mode:
authorLiam Murphy <43807659+Liamolucko@users.noreply.github.com>2021-01-06 10:42:40 +1100
committerGitHub <noreply@github.com>2021-01-06 00:42:40 +0100
commit4c4791b5899afe585738ac0a15ba5c21d36952cc (patch)
tree92a0acb0abf54098ac5fd71016a4931c5f346e26 /std/node/module.ts
parent39bbbbce70c13575857b216b79ec21c37a923760 (diff)
fix(std/node): resolve files in symlinked directories (#8840)
Diffstat (limited to 'std/node/module.ts')
-rw-r--r--std/node/module.ts11
1 files changed, 1 insertions, 10 deletions
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