summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2017-02-20 06:18:43 -0800
committerSam Roberts <vieuxtech@gmail.com>2017-04-25 09:59:54 -0700
commitf2282bb812860284035d2a2ed8ac7074bf84cb50 (patch)
treed3ef613cb3e1e1fb8e1ceb852769cbdc51e64fca /doc
parente522bcd774c6a43d8facc1905b59e53a86f7ae0a (diff)
downloadandroid-node-v8-f2282bb812860284035d2a2ed8ac7074bf84cb50.tar.gz
android-node-v8-f2282bb812860284035d2a2ed8ac7074bf84cb50.tar.bz2
android-node-v8-f2282bb812860284035d2a2ed8ac7074bf84cb50.zip
src: allow CLI args in env with NODE_OPTIONS
Not all CLI options are supported, those that are problematic from a security or implementation point of view are disallowed, as are ones that are inappropriate (for example, -e, -p, --i), or that only make sense when changed with code changes (such as options that change the javascript syntax or add new APIs). PR-URL: https://github.com/nodejs/node/pull/12028 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/cli.md34
-rw-r--r--doc/node.17
2 files changed, 41 insertions, 0 deletions
diff --git a/doc/api/cli.md b/doc/api/cli.md
index e003d38fe2..9a86dc0c7d 100644
--- a/doc/api/cli.md
+++ b/doc/api/cli.md
@@ -397,6 +397,40 @@ added: v7.5.0
When set to `1`, process warnings are silenced.
+### `NODE_OPTIONS=options...`
+<!-- YAML
+added: REPLACEME
+-->
+
+`options...` are interpreted as if they had been specified on the command line
+before the actual command line (so they can be overriden). Node will exit with
+an error if an option that is not allowed in the environment is used, such as
+`-p` or a script file.
+
+Node options that are allowed are:
+- `--enable-fips`
+- `--force-fips`
+- `--icu-data-dir`
+- `--no-deprecation`
+- `--no-warnings`
+- `--openssl-config`
+- `--prof-process`
+- `--redirect-warnings`
+- `--require`, `-r`
+- `--throw-deprecation`
+- `--trace-deprecation`
+- `--trace-events-enabled`
+- `--trace-sync-io`
+- `--trace-warnings`
+- `--track-heap-objects`
+- `--use-bundled-ca`
+- `--use-openssl-ca`
+- `--v8-pool-size`
+- `--zero-fill-buffers`
+
+V8 options that are allowed are:
+- `--max_old_space_size`
+
### `NODE_PENDING_DEPRECATION=1`
<!-- YAML
added: REPLACEME
diff --git a/doc/node.1 b/doc/node.1
index 3dff0a7829..46771b2faa 100644
--- a/doc/node.1
+++ b/doc/node.1
@@ -260,6 +260,13 @@ with small\-icu support.
When set to \fI1\fR, process warnings are silenced.
.TP
+.BR NODE_OPTIONS =\fIoptions...\fR
+\fBoptions...\fR are interpreted as if they had been specified on the command
+line before the actual command line (so they can be overriden). Node will exit
+with an error if an option that is not allowed in the environment is used, such
+as \fB-p\fR or a script file.
+
+.TP
.BR NODE_PATH =\fIpath\fR[:\fI...\fR]
\':\'\-separated list of directories prefixed to the module search path.