@@ -892,7 +892,6 @@ impl Config {
892
892
self . unstable_flags_cli = Some ( unstable_flags. to_vec ( ) ) ;
893
893
}
894
894
if !cli_config. is_empty ( ) {
895
- self . unstable_flags . fail_if_stable_opt ( "--config" , 6699 ) ?;
896
895
self . cli_config = Some ( cli_config. iter ( ) . map ( |s| s. to_string ( ) ) . collect ( ) ) ;
897
896
self . merge_cli_args ( ) ?;
898
897
}
@@ -1165,6 +1164,7 @@ impl Config {
1165
1164
Some ( cli_args) => cli_args,
1166
1165
None => return Ok ( loaded_args) ,
1167
1166
} ;
1167
+ let mut seen = HashSet :: new ( ) ;
1168
1168
for arg in cli_args {
1169
1169
let arg_as_path = self . cwd . join ( arg) ;
1170
1170
let tmp_table = if !arg. is_empty ( ) && arg_as_path. exists ( ) {
@@ -1175,9 +1175,8 @@ impl Config {
1175
1175
anyhow:: format_err!( "config path {:?} is not utf-8" , arg_as_path)
1176
1176
} ) ?
1177
1177
. to_string ( ) ;
1178
- let value = CV :: String ( str_path, Definition :: Cli ) ;
1179
- let map = HashMap :: from ( [ ( "include" . to_string ( ) , value) ] ) ;
1180
- CV :: Table ( map, Definition :: Cli )
1178
+ self . _load_file ( & self . cwd ( ) . join ( & str_path) , & mut seen, true )
1179
+ . with_context ( || format ! ( "failed to load config from `{}`" , str_path) ) ?
1181
1180
} else {
1182
1181
// We only want to allow "dotted key" (see https://toml.io/en/v1.0.0#keys)
1183
1182
// expressions followed by a value that's not an "inline table"
0 commit comments