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

OS level NODE_OPTIONS env variable is not respected #790

Closed
shahar-h opened this issue Oct 6, 2020 · 6 comments
Closed

OS level NODE_OPTIONS env variable is not respected #790

shahar-h opened this issue Oct 6, 2020 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@shahar-h
Copy link

shahar-h commented Oct 6, 2020

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.

@shahar-h shahar-h added the bug Issue identified by VS Code Team member as probable bug label Oct 6, 2020
@connor4312 connor4312 added this to the October 2020 milestone Oct 7, 2020
@connor4312
Copy link
Member

Thanks for the issue, this will be in the next nightly build

@shahar-h
Copy link
Author

shahar-h commented Oct 7, 2020

Thanks for the quick fix 👍

@shahar-h
Copy link
Author

Will it be included in the next patch (v1.50.3)?

@connor4312
Copy link
Member

No, it'll be in 1.51.0

@shahar-h
Copy link
Author

Thanks, do you know when v1.51.0 will be released?

@connor4312
Copy link
Member

Early next month

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants