-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
uv run
with a different root directory
#6733
Comments
Something like Although, maybe |
|
uv --directory is hidden, I guess because it is not yet ready? |
Oh.. I want this too. Why do we hide it? haha |
I think we hide it because we wanted to change the semantics such that relative paths were resolved relative to the CWD rather than |
See: #5613. We should unhide it though. I think I originally added it to facilitate benchmarking, and there wasn't consensus on the team at the time. |
Oh.. hm.. I guess it might make sense to sort that out since it'll be a breaking change. |
This makes more sense to me. You can use shell autocomplete to find the file instead of knowing the script name relative to the project directory |
I think it makes sense but it seems non-trivial and I can see people getting confused either way. |
I would feature request that it should work like this: #5579 (comment) But it doesn't have to be --directory that does it. It could be some other flag on But the current rules for --directory have precedent in cargo -C and git -C. |
@bluss to clarify, |
@zanieb Yep, at least for git I'm sure of that, git says "Run as if git was started in |
We now support |
Thank your for this |
Can I help to point to some documentation on how to use this? As a poetry user, it's unclear how
I can file a new issue, but it seems something like what I've tried should actually work; that is, changes including:
...like this:
|
@mdengler -- please open a new issue articulating your problem rather than commenting on a closed issue. |
@charliermarsh sure; I opened #11490.
I asked for help documenting how the new feature was going to be used, though. Also, the original report does not seem to be resolved with either
Should this issue be re-opened? Or could you point me to where in the documentation it describes how to use |
Happy to add to documentation. I was surprised to find no examples of |
Understood -- you all are doing tons. Thanks for |
I would like to run
bird/main.py
from any directory that the user is in.If the user could specify the package root or
uv
could start searching for thepyproject.toml
from the script path towards the root directory, that would help fix the issue.uv version:
uv 0.3.2
The text was updated successfully, but these errors were encountered: