Skip to content

Commit b32f3b2

Browse files
committed
fix: 跳过非Git目录并记录日志
1 parent 15e162d commit b32f3b2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

provider/local/local.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ func (l *Local) LoadRepos(owner *provider.Owner) ([]string, error) {
3232
}
3333
repos := make([]string, 0)
3434
for _, dirEntry := range dirEntries {
35-
if dirEntry.IsDir() && isGitRepository(filepath.Join(ownerPath, dirEntry.Name())) {
35+
if dirEntry.IsDir() {
36+
if !isGitRepository(filepath.Join(ownerPath, dirEntry.Name())) {
37+
log.Printf("skipping non-git dir %s/%s", owner.Name, dirEntry.Name())
38+
continue
39+
}
3640
repos = append(repos, dirEntry.Name())
3741
}
3842
}

0 commit comments

Comments
 (0)