check: add progress bar to the tree structure check

This commit is contained in:
Michael Eischer authored and Alexander Neumann committed 2021-01-28 11:10:50 +01:00
1 parent 505f8a2229
commit e2b0072441
5 files changed
+13 -6

No files matched your search

+5 -1
View File
@@ -240,7 +240,11 @@ func runCheck(opts CheckOptions, gopts GlobalOptions, args []string) error {
Verbosef("check snapshots, trees and blobs\n")
errChan = make(chan error)
go chkr.Structure(gopts.ctx, errChan)
go func() {
bar := newProgressMax(!gopts.Quiet, 0, "snapshots")
defer bar.Done()
chkr.Structure(gopts.ctx, bar, errChan)
}()
for err := range errChan {
errorsFound = true