-
-
Notifications
You must be signed in to change notification settings - Fork 418
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
Allow inject enviroment variables via .env or other env file #3355
Comments
does this work for you? |
I think this can work for basic usage, but it will still depend on some hard-code config. In some circumstances, I may create different env files for various environments, like |
I have some other ideas. A famous saying goes "convention over configuration". It would be great if we could automatically read But at this stage, explicitly passing the dotenv file name from the command line parameters can solve your problem. |
we can do this thing at the same time lol. |
So, Let me describe the detail
@frostming WDYT |
Feature Description
For now, we may run some code via PDM script like
Or I may some other environment variables in my program. I may want to write the environment variables to a file like .env when I deploy my program.
Problem and Solution
I propose add new global flag
--env-file
, the default value is.env
. The PDM main process will inject the environment variables into subprocess if the file is existAdditional Context
No response
Are you willing to contribute to the development of this feature?
The text was updated successfully, but these errors were encountered: