Skip to content
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

VSCode .env parser does not handle environment variables with = properly #206787

Closed
ghost opened this issue Mar 4, 2024 · 1 comment
Closed
Assignees

Comments

@ghost
Copy link

ghost commented Mar 4, 2024

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.87.0 , 019f4d1, x64
  • OS Version: Windows 10 Enterprise, 10.0.19045 Build 19045

Loading the workspace .env file loads an environment variable with a = in it. This means that it fails to parse things like Connection strings.

Temporary workaround is to disable the environment loading feature (for my case, using python environments, by applying the "python.terminal.activateEnvironment": false setting)

Steps to Reproduce:

  1. create workspace
  2. create .env file
  3. write the line connectionstring=Endpoint=some.endpoint;etc=etc; in said .env file. Use a valid connection string to e.g. an Azure Eventhub, or a local database, or w/e to verify.
  4. Running your code snippets no longer works in the integrated terminal as the VSCode .env parser seems to not read the env file correctly. It works fine in OS native terminals (cmd, PS etc) for Python and TypeScript code, so this is probably an issue with the VSCode env file parser
@karrtikr
Copy link
Contributor

karrtikr commented Mar 5, 2024

This is actually an issue on VS Code. Closing as duplicate of #197603, please like/comment that to raise priority.

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants