check: add progress bar to the tree structure check

This commit is contained in:
Michael Eischer
2021-01-28 11:10:50 +01:00
committed by Alexander Neumann
parent 505f8a2229
commit e2b0072441
5 changed files with 13 additions and 6 deletions
+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