Skip to content

Commit

Permalink
fix: 跳过非Git目录并记录日志
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Jan 24, 2025
1 parent 15e162d commit b32f3b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion provider/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ func (l *Local) LoadRepos(owner *provider.Owner) ([]string, error) {
}
repos := make([]string, 0)
for _, dirEntry := range dirEntries {
if dirEntry.IsDir() && isGitRepository(filepath.Join(ownerPath, dirEntry.Name())) {
if dirEntry.IsDir() {
if !isGitRepository(filepath.Join(ownerPath, dirEntry.Name())) {
log.Printf("skipping non-git dir %s/%s", owner.Name, dirEntry.Name())
continue
}
repos = append(repos, dirEntry.Name())
}
}
Expand Down

0 comments on commit b32f3b2

Please sign in to comment.