Unverified Commit 1bbe66f4 authored by Michaël Zasso's avatar Michaël Zasso
Browse files

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: default avatarAnna Henningsen <anna@addaleax.net>

PR-URL: https://github.com/nodejs/node/pull/39023


Reviewed-By: default avatarFranziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: default avatarMichael Dawson <midawson@redhat.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
parent 86d6d816
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment