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 realpath function #628

Merged
merged 3 commits into from
Dec 29, 2020
Merged

Fix realpath function #628

merged 3 commits into from
Dec 29, 2020

Conversation

remorses
Copy link
Contributor

@remorses remorses commented Dec 28, 2020

Fix #627

I use panic when there is an error in eval symlinks, this will panic when there is a cycle of symblic links, previously it would try to resolve the links forever˙

@evanw
Copy link
Owner

evanw commented Dec 29, 2020

Thanks for the fix. I'm removing the panic because esbuild shouldn't crash in this case. I added a comment with more rationale about why the error is ignored.

Unfortunately I was unable to reproduce the infinite loop case, neither in the old code nor in the new code. I just get ELOOP. Regardless there is now test coverage for a symlink cycle so it should catch problems if they come up in the future.

@evanw evanw merged commit 2b208fc into evanw:master Dec 29, 2020
evanw added a commit that referenced this pull request Dec 29, 2020
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.

Initial resolveDir is invalid when using Yarn Berry, paths in metafile.json are invalid too
2 participants