From 5149978832d379c611b81cc0e6e029bb17469bb6 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Tue, 28 Mar 2023 08:27:30 -0700 Subject: [PATCH] fix(config): ignore repos with broken head ref (#236) 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 9c36f18955dd143592412746ed472d0727c86d40..9835a4f1d9d8a06ec9f00bc603c7d8685ca2dd94 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