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

Substitution with environment variables #2132

Closed
cecilphillip opened this issue Jul 7, 2020 · 1 comment
Closed

Substitution with environment variables #2132

cecilphillip opened this issue Jul 7, 2020 · 1 comment

Comments

@cecilphillip
Copy link

#1094 is closed, so I'm opening a new one here.
Variable substitution using ${env:var} doesn't seem to be working for me when I try to set it in the localPath property under volumes. I'm using version 1.3.1 on MacOS.
Predefined variables like ${workspaceFolder} work though.

Running the following task outputs the expected path.

 {
      "label": "echo",
      "type": "shell",
      "command": "echo ${env:HOME}"
 }

When I run the container using the extension, the docker run command contains -v "${env:HOME}/.aspnet/https:/https:ro" versus -v "/home/myuser/.aspnet/https:/https:ro"

my configured task looks like this..

{
      "type": "docker-run",
       "label": "docker-run: website debug",
       "dependsOn": [
             "docker-build: website debug"
         ],
         "dockerRun":  {
             "volumes": [
              {
                  "localPath": "${env:USER}/.aspnet/https",
                  "containerPath": "/https",
                  "permissions": "ro"
              }
             ]
            },
            "netCore": {
                "appProject": "${workspaceFolder}/src/ContosoCrafts.WebSite/ContosoCrafts.WebSite.csproj",
                "enableDebugging": true
            }
},
@bwateratmsft
Copy link
Collaborator

This one is the same as #1961, ultimately same as #1413. @cecilphillip, we need changes from the VSCode team to unblock this scenario, do you mind commenting on microsoft/vscode#81007 to encourage them to make said changes? 😄

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 21, 2020
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