-
-
Notifications
You must be signed in to change notification settings - Fork 468
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
Invoke scripts from the project root #932
base: main
Are you sure you want to change the base?
Conversation
I have some use cases that require rye run to preserve the current working directory, maybe this could be configurable in that case? |
@bluss I see three approaches:
|
I'm not sure what's wrong with the current behaviour. Here's an argument in favour of keeping it. These two should be equivalent: They will only be the same if they both behave the same w.r.t cwd. |
Current behavior makes relative file path in the cmd does not work, see #930 |
Note that this function also handles rye run python, rye run cmd where cmd is an executable in the venv too (take for example cmd = pytest). Maybe it makes sense for tool.rye.scripts by itself, yes! |
I feel like making it run from root is a reasonable default as many scripts will be taking relative file arguments. However I do think that if we change that, then an option should be added to override it like PDM does now. Also I do like what npm does with |
Fixes #930