File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1165,6 +1165,7 @@ impl Config {
11651165 Some ( cli_args) => cli_args,
11661166 None => return Ok ( loaded_args) ,
11671167 } ;
1168+ let mut seen = HashSet :: new ( ) ;
11681169 for arg in cli_args {
11691170 let arg_as_path = self . cwd . join ( arg) ;
11701171 let tmp_table = if !arg. is_empty ( ) && arg_as_path. exists ( ) {
@@ -1175,9 +1176,8 @@ impl Config {
11751176 anyhow:: format_err!( "config path {:?} is not utf-8" , arg_as_path)
11761177 } ) ?
11771178 . 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 )
1179+ self . _load_file ( & self . cwd ( ) . join ( & str_path) , & mut seen, true )
1180+ . with_context ( || format ! ( "failed to load config from `{}`" , str_path) ) ?
11811181 } else {
11821182 // We only want to allow "dotted key" (see https://toml.io/en/v1.0.0#keys)
11831183 // expressions followed by a value that's not an "inline table"
You can’t perform that action at this time.
0 commit comments