We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3f0077 commit 4e5483fCopy full SHA for 4e5483f
cmd/gh-classroom/pull/student-repos/student-repos.go
@@ -71,20 +71,15 @@ func NewCmdStudentReposPull(f *cmdutil.Factory) *cobra.Command {
71
log.Fatal(err)
72
}
73
74
- all_entries, err := os.ReadDir(fullPath)
+ entries, err := os.ReadDir(fullPath)
75
if err != nil {
76
77
78
79
- //filter entries to only directories
80
- var entries []os.DirEntry
81
- for _, r := range all_entries {
82
- if r.IsDir() {
83
- entries = append(entries, r)
84
- }
85
86
-
87
for _, r := range entries {
+ if !r.IsDir() {
+ continue
+ }
88
clonePath := filepath.Join(fullPath, r.Name())
89
fmt.Printf("Pulling repo: %v\n", clonePath)
90
err = os.Chdir(clonePath)
0 commit comments