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

environment variables no longer valid in workspace settings.json or tasks.json #71740

Closed
sebirdman opened this issue Apr 4, 2019 · 12 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@sebirdman
Copy link

  • VSCode Version: 1.33.0
  • OS Version: Ubuntu 18.0.4

Steps to Reproduce:

  1. put some variables in EG: ${env:PATH}
    "terminal.integrated.env.linux": {
        "DATA": "${env:PATH};${workspaceFolder}/xtensa-esp32-elf/bin",
    }
  1. echo out that variable in the integrated terminal

echo $DATA

;/home/bird/deako/goat/xtensa-esp32-elf/bin

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

@vscodebot
Copy link

vscodebot bot commented Apr 4, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@sebirdman
Copy link
Author

i should note that the above example works fine for me on 1.32.3

@MrBretticus
Copy link

I can confirm the same experience after upgrading to 1.33.0 on Windows.

Version: 1.33.0 (user setup)
Commit: 0dd516d
Date: 2019-04-04T15:14:46.685Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT ia32 10.0.17134

@sandym
Copy link

sandym commented Apr 4, 2019

same here in tasks.json. On macOS.

Edit: replacing ${env:HOME} with ${HOME} fixed my problem. It that the new way of doing it ?

@ackava
Copy link

ackava commented Apr 5, 2019

@sebirdman This issue is happening throughout, ${env:*} is not working anywhere in vs code. May be syntax has changed or something is missing in tasks.json documentation.

@ricardofreeman
Copy link

Experiencing the same issue here with

Version: 1.33.0 (user setup)
Commit: 0dd516d
Date: 2019-04-04T15:14:28.026Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17763

My current setup in c:\Users\Ricardo\AppData\Roaming\Code\User\settings.json is

...
    "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
    "terminal.integrated.env.windows": {
        "PATH": "${env:PATH}"
    },
...

It was working before I updated VSCode this morning.
Will be following this issue, as I couldn't find an answer in the related issues.

@marcelnubi
Copy link

Same issue here:

Version: 1.33.0 (user setup)
Commit: 0dd516d
Date: 2019-04-04T15:14:28.026Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17134

@davidwin
Copy link

davidwin commented Apr 8, 2019

same here in tasks.json. On macOS.
Edit: replacing ${env:HOME} with ${HOME} fixed my problem. It that the new way of doing it ?

I think what you see happening is ${HOME} being interpreted by your shell, not VSCode. For instance, on Windows I have WSL set as the shell for a project, and ${HOME} evaluates to /home/user, and ${LOCALAPPDATA} to nothing. I need to be able to evaluate ${env:LOCALAPPDATA}, but that is no longer possible.

@yaroslavsadin
Copy link

Any fix for windows?

@edwin-hendriks
Copy link

Same issue here on Windows. And I was doing a demo for a client (which failed as a result on this particular point). That was rather awkward. It would be great if the VS Code team could solve this.

@vscodebot vscodebot bot removed the new release label Apr 9, 2019
@davidwin
Copy link

Looks like #72029

@Tyriar
Copy link
Member

Tyriar commented Apr 12, 2019

/duplicate #72029, fyi @alexr00

@Tyriar Tyriar closed this as completed Apr 12, 2019
@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Apr 12, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

10 participants