Skip to content

Commit 470ad0f

Browse files
cristianocchenglou
andauthored
Fix another infinite loop on paths on Windows. (#199)
* Fix another infinite loop on paths on Windows. Co-authored-by: Cheng Lou <[email protected]>
1 parent f36bef2 commit 470ad0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

analysis/src/ModuleResolution.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
let rec resolveNodeModulePath ~startPath name =
22
let path = Filename.concat (Filename.concat startPath "node_modules") name in
33
if Files.exists path then Some path
4-
else if startPath = "/" then None
4+
else if Filename.dirname startPath = startPath then None
55
else resolveNodeModulePath ~startPath:(Filename.dirname startPath) name

0 commit comments

Comments
 (0)