112
112
namespace node {
113
113
114
114
using native_module::NativeModuleEnv;
115
- using options_parser::kAllowedInEnvironment ;
116
- using options_parser::kDisallowedInEnvironment ;
117
115
118
116
using v8::Boolean;
119
117
using v8::EscapableHandleScope;
@@ -631,7 +629,7 @@ void ResetStdio() {
631
629
int ProcessGlobalArgs (std::vector<std::string>* args,
632
630
std::vector<std::string>* exec_args,
633
631
std::vector<std::string>* errors,
634
- bool is_env ) {
632
+ OptionEnvvarSettings settings ) {
635
633
// Parse a few arguments which are specific to Node.
636
634
std::vector<std::string> v8_args;
637
635
@@ -641,7 +639,7 @@ int ProcessGlobalArgs(std::vector<std::string>* args,
641
639
exec_args,
642
640
&v8_args,
643
641
per_process::cli_options.get (),
644
- is_env ? kAllowedInEnvironment : kDisallowedInEnvironment ,
642
+ settings ,
645
643
errors);
646
644
647
645
if (!errors->empty ()) return 9 ;
@@ -803,12 +801,18 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
803
801
return 9 ;
804
802
}
805
803
806
- const int exit_code = ProcessGlobalArgs (&env_argv, nullptr , errors, true );
804
+ const int exit_code = ProcessGlobalArgs (&env_argv,
805
+ nullptr ,
806
+ errors,
807
+ kAllowedInEnvironment );
807
808
if (exit_code != 0 ) return exit_code;
808
809
}
809
810
#endif
810
811
811
- const int exit_code = ProcessGlobalArgs (argv, exec_argv, errors, false );
812
+ const int exit_code = ProcessGlobalArgs (argv,
813
+ exec_argv,
814
+ errors,
815
+ kDisallowedInEnvironment );
812
816
if (exit_code != 0 ) return exit_code;
813
817
814
818
// Set the process.title immediately after processing argv if --title is set.
0 commit comments