Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix another infinite loop on paths on Windows. #199

Merged
merged 2 commits into from
Apr 29, 2021
Merged

Fix another infinite loop on paths on Windows. #199

merged 2 commits into from
Apr 29, 2021

Conversation

cristianoc
Copy link
Collaborator

No description provided.

@@ -1,5 +1,5 @@
let rec resolveNodeModulePath ~startPath name =
let path = Filename.concat (Filename.concat startPath "node_modules") name in
if Files.exists path then Some path
else if startPath = "/" then None
else if startPath = "/" || Filename.dirname startPath = startPath then None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first condition can be dropped right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it can be dropped.

@chenglou
Copy link
Member

This is probably it.

@chenglou chenglou merged commit 470ad0f into master Apr 29, 2021
@chenglou chenglou deleted the inf branch April 29, 2021 14:54
@chenglou chenglou mentioned this pull request Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants