restore: reorganize progress bar code

The structure is now much more similar to that of the backup command.
This commit is contained in:
Michael Eischer
2023-06-09 12:03:33 +02:00
parent bb20078641
commit a9aff885d6
5 changed files with 94 additions and 80 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ func runRestore(ctx context.Context, opts RestoreOptions, gopts GlobalOptions,
var progress *restoreui.Progress
if !gopts.Quiet && !gopts.JSON {
progress = restoreui.NewProgress(restoreui.NewProgressPrinter(term), calculateProgressInterval(!gopts.Quiet, gopts.JSON))
progress = restoreui.NewProgress(restoreui.NewTextPrinter(term), calculateProgressInterval(!gopts.Quiet, gopts.JSON))
}
res := restorer.NewRestorer(repo, sn, opts.Sparse, progress)