Skip to content

OS level NODE_OPTIONS env variable is not respected #790

@shahar-h

Description

@shahar-h

Describe the bug
When defining NODE_OPTIONS env variable at OS level it is being overriden when starting debug session.

To Reproduce
Steps to reproduce the behavior:

  1. Clone this repo
  2. Add to Extension launch config:
"env": {
    "NODE_OPTIONS": "--use-openssl-ca"
}
  1. Run extension launch config
  2. In the extension development host create index.js file that contains console.log(process.env.NODE_OPTIONS)
  3. Create the following launch config:
 {
       "name": "Launch Program",
       "program": "${workspaceFolder}/index.js",
       "request": "launch",
       "skipFiles": [
          "<node_internals>/**"
       ],
       "type": "node"
 }
  1. Run it with Debug › JavaScript: Use Preview enabled - --require "c:/Users/i318734/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/ms-vscode.js-debug/src/bootloader.bundle.js" is displayed.
  2. Run it with Debug › JavaScript: Use Preview disabled - --use-openssl-ca is displayed.

I would expect that NODE_OPTIONS OS value will be concatenated to the new value instead of being replaced.
My use case is to load certificates from the OS certificate store by default for any node process instead of using the bundled NodeJS certificate store.

Log File

VS Code Version: 1.47.3

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions