-
Notifications
You must be signed in to change notification settings - Fork 387
feat(exec): accept relative paths #4945
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
feat(exec): accept relative paths #4945
Conversation
| assert!(looks_like_path("file.tar.bz2")); | ||
| assert!(looks_like_path("file.conda")); | ||
| assert!(!looks_like_path("python>=3.12")); | ||
| assert!(!looks_like_path("conda-forge::python")); |
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.
might be good to add more cases here if we know m?
tdejager
left a comment
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.
An additional comment.
baszalmstra
left a comment
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.
This looks really good to me!
exec can accept relative paths.
Description
This allows for passing of relative parts to
exec. As an example:From this PR
This useful for testing out local conda files you have just build using pixi build, this was already possible with absolute paths.
The question is how to solve this, doing this in rattler would require accesing the
pwdwhile parsing, which is not ideal. I opted to go for a typed data-structure here. I'm keeping it in draft until we are sure this makes sense. I think the downside of this approach is that it adds a lot of code, we can also add a clap parser, but that does not make this explicitly in the type.Fixes: #4867 (by adding relevant tests)
How Has This Been Tested?
Manually, and a number of tests have been added.
AI Disclosure
I made the initial idea and codex worked it out for me.
Checklist:
schema/model.py.