You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don Jayamanne (@DonJayamanne) Is it just a file named .env? And is it just every line formatted at var=val? Comments allowed somehow or anything else that one needs to know to document this?
If the setting envFile (listed previously) is not available in the launch.json (debugger settings file), then the environment file will not be loaded (i.e there are no defaults if the setting is missing from the configuration file).
So if python.envFile is required to be set for this to work,
Yes
what is the default file name of .env from
This default value comes from the configuration settings in package.json for python.envFile.
I.e. even if the user doesn't provide this, the default is ${workspaceFolder}/.env
Is there a command to create it or something?
No. Currently we expect the user to create a file maually (named .env or other and configure the settings accordingly).
Activity
brettcannon commentedon Jan 12, 2018
Don Jayamanne (@DonJayamanne) Is it just a file named
.env? And is it just every line formatted atvar=val? Comments allowed somehow or anything else that one needs to know to document this?DonJayamanne commentedon Jan 16, 2018
#are ignoredvar=val.env,envFile(listed previously) is not available in thelaunch.json(debugger settings file), then the environment file will not be loaded (i.e there are no defaults if the setting is missing from the configuration file).brettcannon commentedon Jan 16, 2018
So if
python.envFileis required to be set for this to work, what is the default file name of.envfrom? Is there a command to create it or something?DonJayamanne commentedon Jan 16, 2018
Yes
This default value comes from the configuration settings in
package.jsonforpython.envFile.I.e. even if the user doesn't provide this, the default is
${workspaceFolder}/.envNo. Currently we expect the user to create a file maually (named
.envor other and configure the settings accordingly).brettcannon commentedon Jan 17, 2018
OK, so
python.envFileisn't directly required because we provide a default value.DonJayamanne commentedon Jan 17, 2018
Yes
monkeez commentedon Feb 26, 2018
Can you set values in the .env file that get picked up in the python workspace settings?
Say I had an .env file with:
Then in my workspace settings I had:
Would this work?
DonJayamanne commentedon Feb 26, 2018
Mitch Coote (@monkeez)
No this wouldn't.
barakbd commentedon Apr 10, 2018
I have a multi-line variable (encrypted private key). How can I get around this issue?
DonJayamanne commentedon Apr 10, 2018
Barak BD (@barakbd) please create a separate issue for this (so it can be tracked). Currently its not supported, but should be easy to fix.