123
123
namespace node {
124
124
125
125
using native_module::NativeModuleEnv;
126
- using options_parser::kAllowedInEnvironment ;
127
- using options_parser::kDisallowedInEnvironment ;
128
126
129
127
using v8::Boolean;
130
128
using v8::EscapableHandleScope;
@@ -679,7 +677,7 @@ void ResetStdio() {
679
677
int ProcessGlobalArgs (std::vector<std::string>* args,
680
678
std::vector<std::string>* exec_args,
681
679
std::vector<std::string>* errors,
682
- bool is_env ) {
680
+ OptionEnvvarSettings settings ) {
683
681
// Parse a few arguments which are specific to Node.
684
682
std::vector<std::string> v8_args;
685
683
@@ -689,7 +687,7 @@ int ProcessGlobalArgs(std::vector<std::string>* args,
689
687
exec_args,
690
688
&v8_args,
691
689
per_process::cli_options.get (),
692
- is_env ? kAllowedInEnvironment : kDisallowedInEnvironment ,
690
+ settings ,
693
691
errors);
694
692
695
693
if (!errors->empty ()) return 9 ;
@@ -851,12 +849,18 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
851
849
return 9 ;
852
850
}
853
851
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 );
855
856
if (exit_code != 0 ) return exit_code;
856
857
}
857
858
#endif
858
859
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 );
860
864
if (exit_code != 0 ) return exit_code;
861
865
862
866
// Set the process.title immediately after processing argv if --title is set.
0 commit comments