Skip to content

Not able to override env variables using terminal.integrated.env.osx #98490

Closed
@jahan01

Description

@jahan01
  • VSCode Version: 1.45.1
  • OS Version: Mac 10.15.4

Steps to Reproduce:

  1. Set a env variable in your shell script ( .zshenv or .bash_profile depending on your default shell):
echo "sourcing path"
echo "Before: $JAVA_HOME"
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home
echo "After: $JAVA_HOME"
  1. Set your workspace settings.json as
 "terminal.integrated.env.osx": {
        "JAVA_HOME": "/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home",
   }
  1. Launch a terminal and you will see the shell startup scripts overrides the values set by the vscode.
sourcing path
Before: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
After: /Library/Java/JavaVirtualMachines/sapmachine-jdk-11.0.6.0.1.jdk/Contents/Home

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

Metadata

Metadata

Assignees

Labels

*as-designedDescribed behavior is as designed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions