OS level NODE_OPTIONS env variable is not respected
See original GitHub issueDescribe 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:
- Clone this repo
- Add to
Extension
launch config:
"env": {
"NODE_OPTIONS": "--use-openssl-ca"
}
- Run extension launch config
- In the extension development host create index.js file that contains
console.log(process.env.NODE_OPTIONS)
- Create the following launch config:
{
"name": "Launch Program",
"program": "${workspaceFolder}/index.js",
"request": "launch",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
}
- 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. - 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.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
'NODE_OPTIONS' is not recognized as an internal or external ...
On my terminal node is recognized just fine, for example I get the version when I run node --version . But running the...
Read more >Environment variable set but not respected
You've set it, but not exported it. Change the line to this: export EDITOR=vim.
Read more >Command-line API | Node.js v19.3.0 Documentation
Options from the command line take precedence over options passed through the NODE_OPTIONS environment variable. - #. Added in: v8.0.0. Alias for stdin....
Read more >config | npm Docs
Options to pass through to Node.js via the NODE_OPTIONS environment variable. This does not impact how npm itself is executed but it does...
Read more >Working with Environment Variables in Node.js - Twilio
If you don't see the installed Node.js version, you may need to relaunch your terminal. To ensure the installation is correct and running...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Early next month
Thanks, do you know when v1.51.0 will be released?