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

Support lune scripts as directories with init.lua(u) files in them #119

Merged
merged 5 commits into from
Oct 13, 2023

Conversation

CompeyDev
Copy link
Contributor

@CompeyDev CompeyDev commented Oct 9, 2023

Title is pretty self-explanatory (one of the simplest PRs I've ever made honestly). Let me know if I missed anything, not too familiar with the discovery side of the lune codebase.

Closes #98.

Copy link
Collaborator

@filiptibell filiptibell left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! In the future we can probably find a better solution than the long or_else chain but for now extending it works fine. I left a single comment to check out.

src/cli/utils/listing.rs Outdated Show resolved Hide resolved
@CompeyDev
Copy link
Contributor Author

CompeyDev commented Oct 11, 2023

Thank you for the PR! In the future we can probably find a better solution than the long or_else chain but for now extending it works fine. I left a single comment to check out.

What exactly could an alternative to it be? It doesn't feel very correct, imo.

@filiptibell
Copy link
Collaborator

What exactly could an alternative to it be? It doesn't feel very correct, imo.

Looking a bit closer at this, I don't think we actually need to lengthen the or_else chain at all, since these few lines already exist in discover_script_path: https://github.com/filiptibell/lune/blob/e16c28fd400530d54b41fe4fca09941386e354d5/src/cli/utils/files.rs#L92-L102

@CompeyDev
Copy link
Contributor Author

Oh that's great, hadn't noticed that!

Copy link
Collaborator

@filiptibell filiptibell left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for the PR!

@filiptibell filiptibell merged commit ec6060a into lune-org:main Oct 13, 2023
5 checks passed
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.

lune -l does not detect directories with init.lua/u in it.
2 participants