diff options
author | Cheng Zhao <zcbenz@gmail.com> | 2021-08-16 03:58:58 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-09-18 17:01:32 +0300 |
commit | d9791d91ac10e10feac303efc3e44bd65c9ce2bf (patch) | |
tree | da0732c447ccbac8e44ac495ff983389df7ed491 /doc | |
parent | e4852e3ff5619a7cb626f193da21f8332e887963 (diff) |
src: add --no-global-search-paths cli option
PR-URL: https://github.com/nodejs/node/pull/39754
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/cli.md | 9 | ||||
-rw-r--r-- | doc/node.1 | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/doc/api/cli.md b/doc/api/cli.md index 3ab4750d8d6..dc0f813a846 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -629,6 +629,14 @@ added: v9.0.0 Disables runtime checks for `async_hooks`. These will still be enabled dynamically when `async_hooks` is enabled. +### `--no-global-search-paths` +<!-- YAML +added: REPLACEME +--> + +Do not search modules from global paths like `$HOME/.node_modules` and +`$NODE_PATH`. + ### `--no-warnings` <!-- YAML added: v6.0.0 @@ -1442,6 +1450,7 @@ Node.js options that are allowed are: * `--no-experimental-repl-await` * `--no-extra-info-on-fatal-exception` * `--no-force-async-hooks-checks` +* `--no-global-search-paths` * `--no-warnings` * `--node-memory-debug` * `--openssl-config` diff --git a/doc/node.1 b/doc/node.1 index a03d322f98e..fa56276b3ca 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -285,6 +285,9 @@ Disable the `node-addons` exports condition as well as disable loading native addons. When `--no-addons` is specified, calling `process.dlopen` or requiring a native C++ addon will fail and throw an exception. . +.It Fl -no-global-search-paths +Do not search modules from global paths. +. .It Fl -no-warnings Silence all process warnings (including deprecations). . |