@@ -56,14 +56,14 @@ impl CommitBoostConfig {
5656 }
5757
5858 pub fn from_file ( path : & PathBuf ) -> Result < Self > {
59- let config: Self = load_from_file ( path) ?;
59+ let ( config, _ ) : ( Self , _ ) = load_from_file ( path) ?;
6060 Ok ( config)
6161 }
6262
6363 // When loading the config from the environment, it's important that every path
6464 // is replaced with the correct value if the config is loaded inside a container
65- pub fn from_env_path ( ) -> Result < Self > {
66- let helper_config: HelperConfig = load_file_from_env ( CONFIG_ENV ) ?;
65+ pub fn from_env_path ( ) -> Result < ( Self , PathBuf ) > {
66+ let ( helper_config, config_path ) : ( HelperConfig , PathBuf ) = load_file_from_env ( CONFIG_ENV ) ?;
6767
6868 let chain = match helper_config. chain {
6969 ChainLoader :: Path { path, genesis_time_secs } => {
@@ -109,13 +109,13 @@ impl CommitBoostConfig {
109109 logs : helper_config. logs ,
110110 } ;
111111
112- Ok ( config)
112+ Ok ( ( config, config_path ) )
113113 }
114114
115115 /// Returns the path to the chain spec file if any
116116 pub fn chain_spec_file ( path : & PathBuf ) -> Option < PathBuf > {
117117 match load_from_file :: < _ , ChainConfig > ( path) {
118- Ok ( config) => {
118+ Ok ( ( config, _ ) ) => {
119119 if let ChainLoader :: Path { path, genesis_time_secs : _ } = config. chain {
120120 Some ( path)
121121 } else {
0 commit comments