Skip to content

Commit

Permalink
fix: new templates not always being saved
Browse files Browse the repository at this point in the history
  • Loading branch information
BrewingWeasel committed Aug 15, 2024
1 parent 81542cd commit 9e3eff3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src-tauri/src/new_language_template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,11 @@ pub async fn use_language_template(
..Default::default()
},
);

let config_file = dirs::config_dir()
.ok_or(KalbaError::MissingDir("config".to_string()))?
.join("kalba.toml");
fs::write(config_file, toml::to_string_pretty(&state.settings)?)?;

Ok(language_name)
}

0 comments on commit 9e3eff3

Please sign in to comment.