Support envfile for tasks.json
See original GitHub issueThe node and Go debuggers both support specifying an env file for environment variables instead of the env
hash. It would be great if we could use the same file in tasks.json to have a single source of truth that can also be used by non-vscode scripts
Issue Analytics
- State:
- Created 6 years ago
- Reactions:75
- Comments:32 (8 by maintainers)
Top Results From Across the Web
How do I access .env variables in tasks.json within vscode?
json file of a C# project in vscode . In my launch.json file I have this code to parse a .env file: "configurations":...
Read more >Variables reference - Visual Studio Code
json and tasks.json files using ${variableName} syntax. Predefined variables. The following predefined variables are supported: ${userHome} - the path of ...
Read more >Visual Studio Code: Setting Environment Variable for Tasks
Click Debug icon > Configure gear icon on the Debug view top bar > Select debug environment: Node. It will generate a launch.json...
Read more >Passing environment variables to a container
env file extension and there is a limit of ten files to a task definition. We don't enforce a size limit on the...
Read more >How to use a .env file to load environment variables in a dev ...
Loading environment variables using a . env file when working with Remote - Containers or GitHub Codespaces. Check out the docs for more...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi is there any progress on this request? I need also to define some
.env
variables locally to be used bytasks.json
Need
.env
file support in tasks..env
fileHere is another use case:
Makefile
(link) intasks.json
to prevent having to install make on Windows.env
file (The docker extension for VSCode isn’t flexible enough for this approach)docker-compose.<make step>.yml
files in the meantimedocker-compose
doesn’t supportBuildKit
yet, which means I can’t bind mount local volumes into the build scope, which would allow me to export unit test results from the images at build time (also don’t get the parallel stage builds either)docker run -e password=$PASSWORD
), so there is no way they are being hard-coded intotasks.json
The above workflow example in the
Makefile
will be reused in our CI pipeline.So the only thing we’re missing at the moment is being able to give devs a clean workflow on their local computers.
** /s ** Or we tell them them to maintain both
.env
andtasks.json
themselves and keep them out of git, and that we expect them to do this for the 50+ microservices we have built in the past 8 months, and to keep doing it for the additional ones in the future.