node/lib/internal/bootstrap
Michaël Zasso 1bbe66f432
src: allow to negate boolean CLI flags
This change allows all boolean flags to be negated using the `--no-`
prefix.
Flags that are `true` by default (for example `--deprecation`) are
still documented as negations.
With this change, it becomes possible to easily flip the default
value of a boolean flag and to override the value of a flag passed
in the NODE_OPTIONS environment variable.
`process.allowedNodeEnvironmentFlags` contains both the negated and
non-negated versions of boolean flags.

Co-authored-by: Anna Henningsen <anna@addaleax.net>

PR-URL: https://github.com/nodejs/node/pull/39023
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2021-06-21 20:18:20 +02:00
..
switches lib: refactor to use validateArray 2021-01-20 22:41:00 +01:00
environment.js process: run RunBootstrapping in CreateEnvironment 2019-04-03 08:46:03 +08:00
loaders.js lib: add tsconfig for code completions 2021-04-08 08:35:09 -05:00
node.js lib: include url in bootstrap snapshot and remove unnecessary lazy-loads 2021-06-02 13:30:05 +08:00
pre_execution.js src: allow to negate boolean CLI flags 2021-06-21 20:18:20 +02:00