Skip to content

Commit ddd0661

Browse files
committed
fs.realpathSync() can return undefined
1 parent fd102a0 commit ddd0661

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/jest-resolve/src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export type ResolveModuleConfig = {|
5151
const NATIVE_PLATFORM = 'native';
5252

5353
// We might be inside a symlink.
54-
const resolvedCwd = fs.realpathSync(process.cwd());
54+
const cwd = process.cwd();
55+
const resolvedCwd = fs.realpathSync(cwd) || cwd;
5556
const nodePaths = process.env.NODE_PATH
5657
? process.env.NODE_PATH
5758
.split(path.delimiter)

0 commit comments

Comments
 (0)