diff --git a/internal/pkg/repo/discover.go b/internal/pkg/repo/discover.go index 5d6d8d5..3b2f4d3 100644 --- a/internal/pkg/repo/discover.go +++ b/internal/pkg/repo/discover.go @@ -12,6 +12,7 @@ func GetRepoPathsAsync(baseDir string, result *[]string) error { return err } + subdirs := []string{} for _, entry := range entries { if !entry.IsDir() { continue @@ -21,13 +22,17 @@ func GetRepoPathsAsync(baseDir string, result *[]string) error { *result = append(*result, baseDir) return nil } - - err := GetRepoPathsAsync(fmt.Sprintf("%s/%s", baseDir, entry.Name()), result) - if err != nil { - return err - } + + subdirs = append(subdirs, entry.Name()) } + for _, subdir := range subdirs { + err := GetRepoPathsAsync(fmt.Sprintf("%s/%s", baseDir, subdir), result) + if err != nil { + return err + } + } + return nil }