-
Notifications
You must be signed in to change notification settings - Fork 645
Support for multiple envFile in launch.json #1746
Comments
But then, how would you decide which one to use? |
They all should be used. Each next file adds its contents to env and rewrite existing variables. So, order is significant. |
I encountered this. My workflow is usually centered around kicking off a script to start a delve server and then launching my debug config in code. I worked around this by adding to that little script to create a mega-env. ENV_GEN_FILE=".env_generated"
printf "#\n# Do not edit this file. It is generated!\n#\n" > $ENV_GEN_FILE
# Look for run specific details - first try in $HOME, then override with local
for ENV in $HOME/.env .env
do
if [ -f $ENV ]; then
cat $ENV >> $ENV_GEN_FILE
fi
done |
My apologies @alexus1024, for taking so long to get back to this issue. So, following the example in https://docs.docker.com/compose/compose-file/#env_file, we can update our support of the PRs are most welcome to add this feature. Code Pointers:
|
@ramya-rao-a could you take a look at #2395 and see if this is what you expected for a solution to this? |
Now that I think about it, this should be contributed in a place where it can be used from multiple launch configurations such as node also. Wherever envFile is supported. |
I agree, I am working with node and looking for a way to use multiple envfiles |
The latest version (0.13.0) of this extension has this feature Thanks for the PR @SteelPhase and Thanks for reporting @alexus1024 ! Happy Coding! |
There are multiple env files for each environment in my project - one for "public things" such as server addreses and another for "private things" such as passwords. Currently I can pass only one of them with "envFile" attribute.
It would be cool to pass both of them in launch.json somehow.
The text was updated successfully, but these errors were encountered: