Skip to content

Commit

Permalink
Fix breaking bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Enduriel committed May 23, 2021
1 parent f072f43 commit 95cc508
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ pub fn get_config() -> Result<Config> {

pub fn set_config(new_config: Config, force: bool) -> Result<()> {
let config_path = Path::new("config.yml");
let mut config_file = File::create(config_path)?;
let config = match force {
true => new_config.clone(),
false => get_config()?.merge(&new_config),
};
let mut config_file = File::create(config_path)?;
let config_contents = serde_yaml::to_string(&config)?;
config_file.write(config_contents.as_bytes())?;

Expand Down

0 comments on commit 95cc508

Please sign in to comment.