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 committed 2023-06-09 12:03:33 +02:00
1 parent bb20078641
commit a9aff885d6
5 files changed
+94 -80

No files matched your search

+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)