Skip to content

Commit

Permalink
fix: handle repos with no README.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
Toby Padilla committed Feb 18, 2022
1 parent f3e2b7f commit f67596d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ func (rs *RepoSource) loadRepo(name string, rg *git.Repository) (*Repo, error) {
}
r.head = ref
rm, err := r.LatestFile("README.md")
if err != nil {
if err == object.ErrFileNotFound {
rm = ""
} else if err != nil {
return nil, err
}
r.Readme = rm
Expand Down

0 comments on commit f67596d

Please sign in to comment.