123123namespace node {
124124
125125using native_module::NativeModuleEnv;
126- using options_parser::kAllowedInEnvironment ;
127- using options_parser::kDisallowedInEnvironment ;
128126
129127using v8::Boolean;
130128using v8::EscapableHandleScope;
@@ -679,7 +677,7 @@ void ResetStdio() {
679677int ProcessGlobalArgs (std::vector<std::string>* args,
680678 std::vector<std::string>* exec_args,
681679 std::vector<std::string>* errors,
682- bool is_env ) {
680+ OptionEnvvarSettings settings ) {
683681 // Parse a few arguments which are specific to Node.
684682 std::vector<std::string> v8_args;
685683
@@ -689,7 +687,7 @@ int ProcessGlobalArgs(std::vector<std::string>* args,
689687 exec_args,
690688 &v8_args,
691689 per_process::cli_options.get (),
692- is_env ? kAllowedInEnvironment : kDisallowedInEnvironment ,
690+ settings ,
693691 errors);
694692
695693 if (!errors->empty ()) return 9 ;
@@ -851,12 +849,18 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
851849 return 9 ;
852850 }
853851
854- const int exit_code = ProcessGlobalArgs (&env_argv, nullptr , errors, true );
852+ const int exit_code = ProcessGlobalArgs (&env_argv,
853+ nullptr ,
854+ errors,
855+ kAllowedInEnvironment );
855856 if (exit_code != 0 ) return exit_code;
856857 }
857858#endif
858859
859- const int exit_code = ProcessGlobalArgs (argv, exec_argv, errors, false );
860+ const int exit_code = ProcessGlobalArgs (argv,
861+ exec_argv,
862+ errors,
863+ kDisallowedInEnvironment );
860864 if (exit_code != 0 ) return exit_code;
861865
862866 // Set the process.title immediately after processing argv if --title is set.
0 commit comments