mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
Only create config-directory on init success
We should only create the file if the user finished the initial setup correctly.
This commit is contained in:
parent
d96e20a5b0
commit
538b25a6dd
@ -123,10 +123,11 @@ where
|
||||
F: Fn() -> Result<Config>,
|
||||
{
|
||||
info!("Config file not found, running initial setup...");
|
||||
ensure_directory_exists(config_path.as_path())?;
|
||||
let initial_config = config_file()?;
|
||||
|
||||
let toml = toml::to_string(&initial_config)?;
|
||||
|
||||
ensure_directory_exists(config_path.as_path())?;
|
||||
fs::write(&config_path, toml)?;
|
||||
|
||||
info!(
|
||||
|
Loading…
Reference in New Issue
Block a user