From d8f3e35730a6ed9c9217b1eddfae6254adf9a174 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 14 Sep 2025 10:39:47 +0200 Subject: [PATCH] prune: replace Print call with termstatus usage --- cmd/restic/cmd_prune.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/restic/cmd_prune.go b/cmd/restic/cmd_prune.go index 08175b92f..97efb3b2b 100644 --- a/cmd/restic/cmd_prune.go +++ b/cmd/restic/cmd_prune.go @@ -187,13 +187,11 @@ func runPrune(ctx context.Context, opts PruneOptions, gopts GlobalOptions, term } func runPruneWithRepo(ctx context.Context, opts PruneOptions, gopts GlobalOptions, repo *repository.Repository, ignoreSnapshots restic.IDSet, term *termstatus.Terminal) error { + printer := newTerminalProgressPrinter(gopts.JSON, gopts.verbosity, term) if repo.Cache() == nil { - Print("warning: running prune without a cache, this may be very slow!\n") + printer.S("warning: running prune without a cache, this may be very slow!") } - printer := newTerminalProgressPrinter(gopts.JSON, gopts.verbosity, term) - - printer.P("loading indexes...\n") // loading the index before the snapshots is ok, as we use an exclusive lock here bar := newIndexTerminalProgress(printer) err := repo.LoadIndex(ctx, bar)