@@ -1018,41 +1018,14 @@ impl GlobalContext {
10181018        unstable_flags :  & [ String ] , 
10191019        cli_config :  & [ String ] , 
10201020    )  -> CargoResult < ( ) >  { 
1021-         for  warning in  self 
1022-             . unstable_flags 
1023-             . parse ( unstable_flags,  self . nightly_features_allowed ) ?
1024-         { 
1025-             self . shell ( ) . warn ( warning) ?; 
1026-         } 
1027-         if  !unstable_flags. is_empty ( )  { 
1028-             // store a copy of the cli flags separately for `load_unstable_flags_from_config` 
1029-             // (we might also need it again for `reload_rooted_at`) 
1030-             self . unstable_flags_cli  = Some ( unstable_flags. to_vec ( ) ) ; 
1031-         } 
1032-         if  !cli_config. is_empty ( )  { 
1033-             self . cli_config  = Some ( cli_config. iter ( ) . map ( |s| s. to_string ( ) ) . collect ( ) ) ; 
1034-             self . merge_cli_args ( ) ?; 
1035-         } 
1036-         if  self . unstable_flags . config_include  { 
1037-             // If the config was already loaded (like when fetching the 
1038-             // `[alias]` table), it was loaded with includes disabled because 
1039-             // the `unstable_flags` hadn't been set up, yet. Any values 
1040-             // fetched before this step will not process includes, but that 
1041-             // should be fine (`[alias]` is one of the only things loaded 
1042-             // before configure). This can be removed when stabilized. 
1043-             self . reload_rooted_at ( self . cwd . clone ( ) ) ?; 
1044-         } 
1045-         let  extra_verbose = verbose >= 2 ; 
1046-         let  verbose = verbose != 0 ; 
1047- 
10481021        // Ignore errors in the configuration files. We don't want basic 
10491022        // commands like `cargo version` to error out due to config file 
10501023        // problems. 
10511024        let  term = self . get :: < TermConfig > ( "term" ) . unwrap_or_default ( ) ; 
10521025
1053-         let  color = color. or_else ( || term. color . as_deref ( ) ) ; 
1054- 
10551026        // The command line takes precedence over configuration. 
1027+         let  extra_verbose = verbose >= 2 ; 
1028+         let  verbose = verbose != 0 ; 
10561029        let  verbosity = match  ( verbose,  quiet)  { 
10571030            ( true ,  true )  => bail ! ( "cannot set both --verbose and --quiet" ) , 
10581031            ( true ,  false )  => Verbosity :: Verbose , 
@@ -1066,16 +1039,17 @@ impl GlobalContext {
10661039                _ => Verbosity :: Normal , 
10671040            } , 
10681041        } ; 
1069- 
1070-         let  cli_target_dir = target_dir. as_ref ( ) . map ( |dir| Filesystem :: new ( dir. clone ( ) ) ) ; 
1071- 
10721042        self . shell ( ) . set_verbosity ( verbosity) ; 
1043+         self . extra_verbose  = extra_verbose; 
1044+ 
1045+         let  color = color. or_else ( || term. color . as_deref ( ) ) ; 
10731046        self . shell ( ) . set_color_choice ( color) ?; 
10741047        if  let  Some ( hyperlinks)  = term. hyperlinks  { 
10751048            self . shell ( ) . set_hyperlinks ( hyperlinks) ?; 
10761049        } 
1050+ 
10771051        self . progress_config  = term. progress . unwrap_or_default ( ) ; 
1078-          self . extra_verbose  = extra_verbose ; 
1052+ 
10791053        self . frozen  = frozen; 
10801054        self . locked  = locked; 
10811055        self . offline  = offline
@@ -1084,8 +1058,34 @@ impl GlobalContext {
10841058                . ok ( ) 
10851059                . and_then ( |n| n. offline ) 
10861060                . unwrap_or ( false ) ; 
1061+         let  cli_target_dir = target_dir. as_ref ( ) . map ( |dir| Filesystem :: new ( dir. clone ( ) ) ) ; 
10871062        self . target_dir  = cli_target_dir; 
10881063
1064+         for  warning in  self 
1065+             . unstable_flags 
1066+             . parse ( unstable_flags,  self . nightly_features_allowed ) ?
1067+         { 
1068+             self . shell ( ) . warn ( warning) ?; 
1069+         } 
1070+         if  !unstable_flags. is_empty ( )  { 
1071+             // store a copy of the cli flags separately for `load_unstable_flags_from_config` 
1072+             // (we might also need it again for `reload_rooted_at`) 
1073+             self . unstable_flags_cli  = Some ( unstable_flags. to_vec ( ) ) ; 
1074+         } 
1075+         if  !cli_config. is_empty ( )  { 
1076+             self . cli_config  = Some ( cli_config. iter ( ) . map ( |s| s. to_string ( ) ) . collect ( ) ) ; 
1077+             self . merge_cli_args ( ) ?; 
1078+         } 
1079+         if  self . unstable_flags . config_include  { 
1080+             // If the config was already loaded (like when fetching the 
1081+             // `[alias]` table), it was loaded with includes disabled because 
1082+             // the `unstable_flags` hadn't been set up, yet. Any values 
1083+             // fetched before this step will not process includes, but that 
1084+             // should be fine (`[alias]` is one of the only things loaded 
1085+             // before configure). This can be removed when stabilized. 
1086+             self . reload_rooted_at ( self . cwd . clone ( ) ) ?; 
1087+         } 
1088+ 
10891089        self . load_unstable_flags_from_config ( ) ?; 
10901090
10911091        Ok ( ( ) ) 
0 commit comments