-
Notifications
You must be signed in to change notification settings - Fork 92
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 require not throwing syntax error #168
Conversation
🙏 Thank you for this PR - this pretty simple bug does get quite annoying at times, but I had been procrastinating actually PR'ing a fix for it. |
Thank you for the PR! Took a look through and it seems good - but I'm wondering if maybe we should go about this a bit differently? With this PR we are checking specifically against syntax errors and returning those early, when we should probably be checking for anything that's not a "file doesn't exist" error and falling through to the next path if we get one of those 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like we need to also check for if the error is an "is a directory" error for the first few branches, otherwise requiring dir/init.lua
and dir/init.luau
as require("dir")
below stops working (https://github.com/lune-org/lune/actions/runs/8603776567/job/23634709137?pr=168)
Thank you! |
Fixes #139