diff options
author | Cheng Zhao <zcbenz@gmail.com> | 2021-08-13 11:03:25 +0900 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-09-18 16:01:29 +0200 |
commit | e4852e3ff5619a7cb626f193da21f8332e887963 (patch) | |
tree | 3f81685580c77ba6b8fb9ae990a340ddb4115904 /src/node.h | |
parent | 40c6e838dff37d0ccbc95ef28caac13f27a5238f (diff) | |
download | node-new-e4852e3ff5619a7cb626f193da21f8332e887963.tar.gz |
src: add option to disable global search paths
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 'src/node.h')
-rw-r--r-- | src/node.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/node.h b/src/node.h index e4a7de217e..f34ed39397 100644 --- a/src/node.h +++ b/src/node.h @@ -413,7 +413,12 @@ enum Flags : uint64_t { // so that a worker thread can't load a native addon even if `execArgv` // is overwritten and `--no-addons` is not specified but was specified // for this Environment instance. - kNoNativeAddons = 1 << 6 + kNoNativeAddons = 1 << 6, + // Set this flag to disable searching modules from global paths like + // $HOME/.node_modules and $NODE_PATH. This is used by standalone apps that + // do not expect to have their behaviors changed because of globally + // installed modules. + kNoGlobalSearchPaths = 1 << 7 }; } // namespace EnvironmentFlags |