-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Closed
Labels
Description
Reported in https://github.com/microsoft/vscode-python/issues/5705
In this section: https://github.com/microsoft/vscode-docs/blob/master/docs/python/environments.md#variable-substitution we mention that any existing environment variable could be used when defining an environment variable. But to make it work we need to add {env:VARIABLE_NAME} instead of {VARIABLE_NAME} for it to work when running Python files in the extension.
For example:
- Create .env file with a single line PATH="${PATH};Blah-blah-blah".
- Create a Python file with print(os.environ.get('PATH'))
- Run Python file with the play button
In this case, ;Blah-blah-blah gets printed. If we change the .env file to get $(env:PATH), then it works. So we should update our docs accordingly