VSCode - Not able to resue Env variables set inside terminal.integrated.env.windows

Viewed 1143

In the user settings.json, I used the option to set a couple of Env variables & paths that I would only require inside VSCode :

"terminal.integrated.env.windows": {
      "ANDROID_HOME":"D:\\Android",
      "GIT_FOR_PATH":"D:\\Git\\cmd",
      "PATH":"${env:PATH};${env:ANDROID_HOME};${env:GIT_FOR_PATH}"
    }

But, when I echo %PATH% post restarting VSCode, I just get -> Original-Path-Value;${env:ANDROID_HOME};${env:GIT_FOR_PATH}

Windows 10 - VSCode 1.47.2

I have tried with a few alternatives also -> %ANDROIND_HOME% ${ANDROID_HOME}

Is this feature of substituing Env variables in other Env variables supported with a different syntax/be added in any future version/ popular workaround?

1 Answers

In your user settings (File > Preferences > Settings), add the following:

"terminal.integrated.allowWorkspaceConfiguration": true

Related