Skip to content

Commit f3be6ea

Browse files
committed
Fix retrieval of config file path from env
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
1 parent b57925e commit f3be6ea

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ fn init_driver(driver_type: &str) -> Box<dyn Driver> {
9999

100100
pub fn get_config_content() -> String {
101101
let args = Args::parse();
102-
let cfg_file = PathBuf::from(&args.config_file);
102+
let mut cfg_file = PathBuf::from(&args.config_file);
103+
if let Ok(cfg_file_env) = std::env::var("KCI_STORAGE_CONFIG") {
104+
cfg_file = PathBuf::from(&cfg_file_env);
105+
}
103106
let cfg_content = std::fs::read_to_string(&cfg_file).unwrap();
104107
cfg_content
105108
}

0 commit comments

Comments
 (0)