-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 references in .env file #3275
Comments
@ericsnowcurrently pointed out that |
Considering that this is an app-specific .env file, we can dictate the format for substitution and stick with what is the defacto standard (regardless of platform or shell). The substitution will happen in |
FTR... There are three sorts of `env' files out there:
In the extension:
Highlighting in VSCode: Node: |
There should be a docs update to go along with this. @DonJayamanne, how do I get that rolling? |
File an issue on https://github.com/Microsoft/vscode-docs |
FWIW, the philosophy on |
(for #3275) Notable: * only simple substitution is supported (via `${NAME}`; no nesting) * substitution can be made relative to the current env vars * recursion (setting var relative to itself) is supported * stopped using `dotenv` module (doesn't preserve order) * any invalid substitution causes value to be left as-is * adds the `ENVFILE_VARIABLE_SUBSTITUTION` telemetry event
Currently the
.env
file is not a real dot-env-file because it is a simple list ofname=value
pairs. However "real" .env supports string references: see https://marketplace.visualstudio.com/items?itemName=mikestead.dotenvWhy is this important?
I set up my
PYTHONPATH
in the .env file to mirror runtime set env variables so I can use the integrated debugger. This becomes quite lengthy so I tried:Would be great, if this was allowed.
The text was updated successfully, but these errors were encountered: