Skip to content

Commit

Permalink
fix(git): skip reading files
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Nov 9, 2022
1 parent 9f8c09a commit cf2b319
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (rs *RepoSource) LoadRepo(name string) error {
rp := filepath.Join(rs.Path, name)
r, err := rs.open(rp)
if err != nil {
log.Printf("error opening repository %s: %s", name, err)
log.Printf("error opening repository %q: %s", rp, err)
return err
}
rs.repos[name] = r
Expand All @@ -253,6 +253,10 @@ func (rs *RepoSource) LoadRepos() error {
return err
}
for _, de := range rd {
if !de.IsDir() {
log.Printf("warning: %q is not a directory", filepath.Join(rs.Path, de.Name()))
continue
}
err = rs.LoadRepo(de.Name())
if err == git.ErrNotAGitRepository {
continue
Expand Down

0 comments on commit cf2b319

Please sign in to comment.