Closed
Description
Environment variables (of the form ${env:name}
) are not expanding, or are expanding to the empty string, when occurring in tasks.json
. This was working as of about a week ago, but didn't work today.
- Version: 1.33.0 (user setup)
- Commit: 0dd516d
- Date: 2019-04-04T15:14:28.026Z
- OS: Windows_NT x64 10.0.17763
Also tested in the Insiders build:
- Version: 1.34.0-insider (user setup)
- Commit: 56f1b47
- Date: 2019-04-09T05:19:45.294Z
Steps to Reproduce:
- Create a new empty folder; add
.\.vscode\tasks.json
with the following contents:{ "version": "2.0.0", "tasks": [ { "label": "echo path", "type": "shell", "command": "Write-Host ${env:PATH}", } ] }
- Run this task (Ctrl+Shift+P,
Tasks: Run Task
,echo path
); the output is:i.e. the environment variable expands to the empty string.> Executing task: Write-Host < Terminal will be reused by tasks, press any key to close it.
- Run the same command in the terminal (Ctrl+Shift+`, run
Write-Host ${env:PATH}
); the system path is printed.
Does this issue occur when all extensions are disabled?: Yes