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

Add import path tests #1817

Merged
merged 4 commits into from
Jan 12, 2024
Merged

Add import path tests #1817

merged 4 commits into from
Jan 12, 2024

Conversation

casey
Copy link
Owner

@casey casey commented Jan 3, 2024

This was reported by @michaelCTS in #1813.

Currently, imported recipes run in the directory containing the import source file, and not in the directory of the source file containing the import. This is a bug, since imported recipes are supposed to behave as if they were part of the justfile that imported them.

This adds tests, but doesn't include a fix yet.

Another issue that I identified is that the path of nested imports, i.e., imports within imports, are resolved relative to the directory containing the nested import source file. I think this is also a bug, and that, by the logic that imports are treated as being part of the importing justfile, they should be resolved relative to the importing justfile.

@casey casey marked this pull request as ready for review January 12, 2024 02:57
@casey casey enabled auto-merge (squash) January 12, 2024 03:00
@casey casey merged commit fbd4a43 into master Jan 12, 2024
5 checks passed
@casey casey deleted the fix-import-paths branch January 12, 2024 03:00
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.

1 participant