feat(ux): automatically create default user configuration file if nonexistent (#196)

This commit is contained in:
Alex Pasmantier 2024-12-31 13:11:22 +01:00 committed by GitHub
parent 1899873680
commit 343ed3c126
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,7 +131,9 @@ impl Config {
debug!("Config: {:?}", cfg);
Ok(cfg)
} else {
warn!("No config file found at {:?}", config_dir);
warn!("No config file found at {:?}, creating default configuration file at that location.", config_dir);
// create the default configuration file in the user's config directory
std::fs::write(config_dir.join(CONFIG_FILE_NAME), CONFIG)?;
Ok(default_config)
}
}