From 075b4895145c2de129b3788eea641f02ddd2fc9b Mon Sep 17 00:00:00 2001 From: Gopalakrishna Palem Date: Mon, 22 Aug 2022 12:54:24 +0530 Subject: [PATCH] fix: ignore `EISDIR` when resolving symlinks (#13157) --- packages/jest-util/src/tryRealpath.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jest-util/src/tryRealpath.ts b/packages/jest-util/src/tryRealpath.ts index 0674c5e4cdf8..b5b1fcc68c2d 100644 --- a/packages/jest-util/src/tryRealpath.ts +++ b/packages/jest-util/src/tryRealpath.ts @@ -11,7 +11,7 @@ export default function tryRealpath(path: string): string { try { path = realpathSync.native(path); } catch (error: any) { - if (error.code !== 'ENOENT') { + if (error.code !== 'ENOENT' && error.code !== 'EISDIR') { throw error; } }