Skip to content

Commit f1c6cf7

Browse files
zeripathlunny
andauthored
Prevent Stats Indexer reporting error if repo dir missing (#18870)
Repositories missing their directory should not report an error from the stats indexer. Close #18847 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
1 parent 2f2f11e commit f1c6cf7

File tree

1 file changed

+3
-0
lines changed
  • modules/indexer/stats

1 file changed

+3
-0
lines changed

modules/indexer/stats/db.go

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ func (db *DBIndexer) Index(id int64) error {
3737

3838
gitRepo, err := git.OpenRepositoryCtx(ctx, repo.RepoPath())
3939
if err != nil {
40+
if err.Error() == "no such file or directory" {
41+
return nil
42+
}
4043
return err
4144
}
4245
defer gitRepo.Close()

0 commit comments

Comments
 (0)