Skip to content

Commit dbb35e5

Browse files
Pawel WinogrodzkiPawelWMS
andauthored
feat: add file count to sources downloads (#464)
--------- Co-authored-by: Pawel Winogrodzki <pawelwi@microsoft.com>
1 parent 0ae94b8 commit dbb35e5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

internal/providers/sourceproviders/fedorasource/fedorasource.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ func (g *FedoraSourceDownloaderImpl) downloadAndVerifySources(
165165
sourceFiles []sourceFileInfo,
166166
repoDir string,
167167
) error {
168-
for _, sourceFile := range sourceFiles {
168+
sourcesTotal := len(sourceFiles)
169+
for sourceIndex, sourceFile := range sourceFiles {
169170
destFilePath := filepath.Join(repoDir, sourceFile.fileName)
170171

171172
exists, err := fileutils.Exists(g.fileSystem, destFilePath)
@@ -180,6 +181,7 @@ func (g *FedoraSourceDownloaderImpl) downloadAndVerifySources(
180181
}
181182

182183
slog.Info("Downloading source file...",
184+
"progress", fmt.Sprintf("%d/%d", sourceIndex+1, sourcesTotal),
183185
"fileName", sourceFile.fileName,
184186
"URI", sourceFile.uri,
185187
"destPath", destFilePath,

0 commit comments

Comments
 (0)