File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1447,14 +1447,10 @@ impl GlobalContext {
14471447 let arg_as_path = self . cwd . join ( arg) ;
14481448 let tmp_table = if !arg. is_empty ( ) && arg_as_path. exists ( ) {
14491449 // --config path_to_file
1450- let str_path = arg_as_path
1451- . to_str ( )
1452- . ok_or_else ( || {
1453- anyhow:: format_err!( "config path {:?} is not utf-8" , arg_as_path)
1450+ self . _load_file ( & arg_as_path, & mut seen, true , WhyLoad :: Cli )
1451+ . with_context ( || {
1452+ format ! ( "failed to load config from `{}`" , arg_as_path. display( ) )
14541453 } ) ?
1455- . to_string ( ) ;
1456- self . _load_file ( & self . cwd ( ) . join ( & str_path) , & mut seen, true , WhyLoad :: Cli )
1457- . with_context ( || format ! ( "failed to load config from `{}`" , str_path) ) ?
14581454 } else {
14591455 let doc = toml_dotted_keys ( arg) ?;
14601456 let doc: toml:: Value = toml:: Value :: deserialize ( doc. into_deserializer ( ) )
You can’t perform that action at this time.
0 commit comments