VSCode - Use .env files to interpolate a shell command in code-workspace while creating and trusting dev-cert

18 views Asked by At

Currently I'm developing a project together with a friend, but we use 2 different systems(MacOs,Windows)

I'm writing down a code-workspace file to make it easier for us to work together.

Maybe there is a better approach for it, but for now I want to be able to use .env file to interpolate the values of the following task

{
        "type": "shell",
        "command": "dotnet dev-certs https -ep ${HOME}/.aspnet/https/${env:DOTNET_DEV_CERT_NAME}.pfx -p ${env:DOTNET_DEV_CERT_PASSWORD} && dotnet dev-certs https --trust",
        "label": "generate-and-trust-dev-ssl-cert",
        "problemMatcher": [],  
}

But When I run start the environment variables are empty, which leads me to an error executing the project.

Any ideas? I totally opened to other suggestions instead of doing this.

0

There are 0 answers