@@ -8,7 +8,7 @@ use config::{
88 builder:: { ConfigBuilder , DefaultState } ,
99 File ,
1010} ;
11- use dip_core:: { config:: ConfigPlugin as ConfigPluginRaw , prelude:: ConfigStartupStage } ;
11+ use dip_core:: { config:: ConfigPlugin , prelude:: ConfigStartupStage } ;
1212use reqwest:: Url ;
1313use serde:: { de, Deserialize , Deserializer } ;
1414use std:: { fs, path:: PathBuf } ;
@@ -17,14 +17,14 @@ pub struct BundleConfigPlugin;
1717
1818impl Plugin for BundleConfigPlugin {
1919 fn build ( & self , app : & mut App ) {
20- app. add_plugin ( ConfigPluginRaw :: < BundleConfig > :: with_default_str (
20+ app. add_plugin ( ConfigPlugin :: < BundleConfig > :: with_default_str (
2121 include_str ! ( "config/default.toml" ) ,
2222 ) )
23- . add_startup_system_to_stage ( ConfigStartupStage :: Setup , add_sources ) ;
23+ . add_startup_system_to_stage ( ConfigStartupStage :: Setup , add_user_config ) ;
2424 }
2525}
2626
27- fn add_sources ( mut builder : ResMut < ConfigBuilder < DefaultState > > ) {
27+ fn add_user_config ( mut builder : ResMut < ConfigBuilder < DefaultState > > ) {
2828 let config_file_path = BundleConfig :: config_file_path ( ) ;
2929
3030 if config_file_path. is_file ( ) {
@@ -75,8 +75,7 @@ pub struct BundleConfig {
7575
7676impl BundleConfig {
7777 pub fn config_file_path ( ) -> PathBuf {
78- let p = Config :: config_dir ( ) . join ( "bundle" ) ;
79- Config :: ensure_dir ( & p) ;
78+ let p = Config :: config_dir ( ) . join ( "bundle.toml" ) ;
8079
8180 p
8281 }
0 commit comments