File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1165,6 +1165,7 @@ impl Config {
1165
1165
Some ( cli_args) => cli_args,
1166
1166
None => return Ok ( loaded_args) ,
1167
1167
} ;
1168
+ let mut seen = HashSet :: new ( ) ;
1168
1169
for arg in cli_args {
1169
1170
let arg_as_path = self . cwd . join ( arg) ;
1170
1171
let tmp_table = if !arg. is_empty ( ) && arg_as_path. exists ( ) {
@@ -1175,9 +1176,8 @@ impl Config {
1175
1176
anyhow:: format_err!( "config path {:?} is not utf-8" , arg_as_path)
1176
1177
} ) ?
1177
1178
. 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) ) ?
1181
1181
} else {
1182
1182
// We only want to allow "dotted key" (see https://toml.io/en/v1.0.0#keys)
1183
1183
// expressions followed by a value that's not an "inline table"
You can’t perform that action at this time.
0 commit comments