Update confy to show the configuration path
With the older version (v0.4.0) there was no possibility to show the configuration path to the user, who therefore had to hunt for its location. By updating it, this path can now be shown during loading and storing. Signed-off-by: Jacob Kiers <code@kiers.eu>
This commit is contained in:
parent
95437f3549
commit
7bbcc3b99b
@ -12,7 +12,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
anyhow = "1.0.32"
|
||||
base64 = "0.12.3"
|
||||
confy = "0.4.0"
|
||||
confy = "0.6.0"
|
||||
dotenv = "0.15.0"
|
||||
isahc = { version = "0.9.8", features = ["json"] }
|
||||
rand = "0.8.5"
|
||||
|
@ -122,10 +122,12 @@ pub struct BunqConfigReady {
|
||||
|
||||
impl BunqConfig {
|
||||
pub fn load() -> Result<BunqConfig> {
|
||||
Ok(confy::load("bunq-rs")?)
|
||||
println!("Loading config file from {}", confy::get_configuration_file_path("bunq-rs", "bunq-rs")?.to_string_lossy());
|
||||
Ok(confy::load("bunq-rs", "bunq-rs")?)
|
||||
}
|
||||
pub fn save(&self) -> Result<()> {
|
||||
confy::store("bunq-rs", self)?;
|
||||
println!("Storing config file in {}", confy::get_configuration_file_path("bunq-rs", None)?.to_string_lossy());
|
||||
confy::store("bunq-rs", "bunq-rs", self)?;
|
||||
Ok(())
|
||||
}
|
||||
pub fn install(mut self) -> Result<BunqConfigReady> {
|
||||
|
Loading…
Reference in New Issue
Block a user