aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/repo_stats.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/repo_stats.go')
-rw-r--r--modules/git/repo_stats.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/git/repo_stats.go b/modules/git/repo_stats.go
index ce82946873..83220104bd 100644
--- a/modules/git/repo_stats.go
+++ b/modules/git/repo_stats.go
@@ -124,9 +124,9 @@ func (repo *Repository) GetCodeActivityStats(fromTime time.Time, branch string)
}
}
}
- err = scanner.Err()
- if err != nil {
- return fmt.Errorf("scan: %w", err)
+ if err = scanner.Err(); err != nil {
+ _ = stdoutReader.Close()
+ return fmt.Errorf("GetCodeActivityStats scan: %w", err)
}
a := make([]*CodeActivityAuthor, 0, len(authors))
for _, v := range authors {