Open jd-solanki opened 6 months ago
I checked PDM and pipenv, neither support setting cwd. We might just need to set the cwd to the project root.
UPDATE: PDM is going to add a working_dir
option in the next version: https://github.com/pdm-project/pdm/pull/2694
And npm run:
Scripts are run from the root of the package folder, regardless of what the current working directory is when npm run is called. If you want your script to use different behavior based on what subdirectory you're in, you can use the
INIT_CWD
environment variable, which holds the full path you were in when you ran npm run.
Hi 👋🏻
I'm using
tool.rye.scripts
for running django server from root of the project and it looks like below:Problem
If I'm already inside
src
dir and runrye run dev
then it gives error due to incorrect dir I'm in.Solution
Provide
cwd
option so we can run rye scripts from anywhere in the projectAnother benefit can be
cmd
option will be much cleaner.