microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.34k stars 1.19k forks source link

Standardize how to do environment variable parsing & substitution #18307

Open karrtikr opened 2 years ago

karrtikr commented 2 years ago

There're two parts to this issue:

Parsing

We should probably always follow dotenv syntax:

Substitution

There are currently two ways of substituting variables in a .env file:

VAR2="value;${env:VAR1}"

and

VAR2="value;${VAR1}"

and a combination of both has to used to resolve all variables in different situations. However, this is not standard syntax. Again we should probably rely on the dotenv syntax always.

starball5 commented 6 months ago

Related on Stack Overflow: Why does VSCode show inline comments as part of environment variables from .env file?

ababak commented 2 weeks ago

Any updates on this? The lack of support for newlines is problematic.