Skip to content

lib, src: use process.config instead of regex

Is safer to use a process.binding('config') defined boolean, than to regex on process.execArgv. Also, this better falls in line with the conventions of checking flags passed to the executable.

I verified that test/async-hooks/test-callback-error.js properly tests this.

First time contributing to the C++ side of Node, please send all the advice 😆

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

lib, src, async_hooks

Merge request reports

Loading