From 66d26300951ef11a20d877e7090fcffddbfb0e04 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Tue, 28 Mar 2023 10:56:47 -0400 Subject: [PATCH] fix(config): ignore repos with broken head ref Skip loading repos with broken head ref. Fixes: https://github.com/charmbracelet/soft-serve/issues/235 --- config/git.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/git.go b/config/git.go index 9c36f1895..9835a4f1d 100644 --- a/config/git.go +++ b/config/git.go @@ -240,7 +240,6 @@ func (rs *RepoSource) LoadRepo(name string) error { rp := filepath.Join(rs.Path, name) r, err := rs.open(rp) if err != nil { - log.Error("error opening repository", "path", rp, "err", err) return err } rs.repos[name] = r @@ -263,7 +262,8 @@ func (rs *RepoSource) LoadRepos() error { continue } if err != nil { - return err + log.Warn("error loading repository", "path", filepath.Join(rs.Path, de.Name()), "err", err) + continue } } return nil