Skip to content

Commit

Permalink
fix(scheduler): when git directory doesn't exist (maybe caused by a f…
Browse files Browse the repository at this point in the history
…ailed clone), simply skip it (#2046)
  • Loading branch information
wsxiaoys authored May 4, 2024
1 parent 185fe74 commit 1bfe0e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/tabby-scheduler/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ impl CacheStore {
&self.dataset_bucket(repository),
|meta_bucket, repo_bucket| {
let last_sync_commit = self.get_meta(&meta_bucket, repository).last_sync_commit;
let current_version = get_git_commit(&dir).unwrap();
let Ok(current_version) = get_git_commit(&dir) else {
warn!("Failed to get current version for {dir:?}, skipping...");
return Ok(());
};

let Some(old_version) = last_sync_commit else {
self.sync_repository_from_scratch(
Expand Down

0 comments on commit 1bfe0e7

Please sign in to comment.