Skip to content

Commit

Permalink
fix(scheduler): ensure repositories exists before iterating through it (
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys authored Feb 4, 2024
1 parent 7a90376 commit 55b36e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/tabby-scheduler/src/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ impl RepositoryExt for RepositoryConfig {
}

pub fn sync_repositories(repositories: &[RepositoryConfig]) -> Result<()> {
// Ensure repositories_dir exist.
std::fs::create_dir_all(repositories_dir())?;

let mut names = HashSet::new();
for repository in repositories {
names.insert(repository.name());
Expand Down

2 comments on commit 55b36e0

@anoldguy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thank goodness! I hit this today, glad it will be in the next version. ❤️

@wsxiaoys
Copy link
Member Author

@wsxiaoys wsxiaoys commented on 55b36e0 Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thank goodness! I hit this today, glad it will be in the next version. ❤️

And it's released in https://github.com/TabbyML/tabby/releases/tag/v0.8.3 🚀

Please sign in to comment.