mirror of
https://github.com/ViViDboarder/bitwarden_rs.git
synced 2024-11-04 20:36:38 +00:00
Enable DATA_FOLDER to affect default CONFIG_FILE path
This commit is contained in:
parent
621f607297
commit
bf446f44f9
@ -9,7 +9,10 @@ lazy_static! {
|
||||
println!("Error loading config:\n\t{:?}\n", e);
|
||||
exit(12)
|
||||
});
|
||||
pub static ref CONFIG_FILE: String = get_env("CONFIG_FILE").unwrap_or_else(|| "data/config.json".into());
|
||||
pub static ref CONFIG_FILE: String = {
|
||||
let data_folder = get_env("DATA_FOLDER").unwrap_or_else(|| String::from("data"));
|
||||
get_env("CONFIG_FILE").unwrap_or_else(|| format!("{}/config.json", data_folder))
|
||||
};
|
||||
}
|
||||
|
||||
pub type Pass = String;
|
||||
|
Loading…
Reference in New Issue
Block a user