Skip to content

Commit

Permalink
Disable node options at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
branchseer committed Oct 24, 2021
1 parent fa7f14a commit 9aa8a68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion patch/node/src/node_embedding_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ extern "C" {
std::vector<std::string> exec_args;
std::vector<std::string> errors;
int exit_code = node::InitializeNodeWithArgs(
&args, &exec_args, &errors
&args, &exec_args, &errors,
static_cast<node::ProcessFlags::Flags>(
node::ProcessFlags::kDisableCLIOptions |
node::ProcessFlags::kDisableNodeOptionsEnv
)
);

if (exit_code != 0) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

os.chdir('node-{}'.format(config.nodeVersion))

configureArgvs = [ '--enable-static', '--without-node-options' ] + config.configFlags
configureArgvs = [ '--enable-static' ] + config.configFlags

if sys.platform == 'win32':
env = os.environ.copy()
Expand Down

0 comments on commit 9aa8a68

Please sign in to comment.