Skip to content

Commit

Permalink
fix: save_model_info failed if dir not exist (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys authored Nov 20, 2023
1 parent 1583e76 commit b35d286
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/tabby-common/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ impl ModelRegistry {
pub fn save_model_info(&self, name: &str) {
let model_info = self.get_model_info(name);
let path = self.get_model_dir(name).join("tabby.json");
fs::create_dir_all(path.parent().unwrap()).unwrap();
serdeconv::to_json_file(model_info, path).unwrap();
}

Expand Down

0 comments on commit b35d286

Please sign in to comment.