mirror of
https://github.com/restic/restic.git
synced 2026-09-03 19:25:02 +00:00
centralize index progress bar for termstatus
This commit is contained in:
@@ -252,7 +252,7 @@ func runCheck(ctx context.Context, opts CheckOptions, gopts GlobalOptions, args
|
||||
}
|
||||
|
||||
printer.P("load indexes\n")
|
||||
bar := newIndexTerminalProgress(gopts.Quiet, gopts.JSON, term)
|
||||
bar := newIndexTerminalProgress(printer)
|
||||
hints, errs := chkr.LoadIndex(ctx, bar)
|
||||
if ctx.Err() != nil {
|
||||
return summary, ctx.Err()
|
||||
@@ -528,6 +528,10 @@ func (*jsonErrorPrinter) NewCounter(_ string) *progress.Counter {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (*jsonErrorPrinter) NewCounterTerminalOnly(_ string) *progress.Counter {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *jsonErrorPrinter) E(msg string, args ...interface{}) {
|
||||
status := checkError{
|
||||
MessageType: "error",
|
||||
|
||||
Reference in New Issue
Block a user