prune: don't print stacktrace on console

This commit is contained in:
Michael Eischer 2020-12-19 14:22:59 +01:00
parent 22260d130d
commit cfea79d0c5

View file

@ -489,7 +489,7 @@ func prune(opts PruneOptions, gopts GlobalOptions, repo restic.Repository, usedB
_, err := repository.Repack(ctx, repo, repackPacks, keepBlobs, bar) _, err := repository.Repack(ctx, repo, repackPacks, keepBlobs, bar)
bar.Done() bar.Done()
if err != nil { if err != nil {
return err return errors.Fatalf("%s", err)
} }
// Since repacking will only add new packs, we can calculate the number // Since repacking will only add new packs, we can calculate the number
@ -505,7 +505,7 @@ func prune(opts PruneOptions, gopts GlobalOptions, repo restic.Repository, usedB
len(removePacks) + packsAddedByRepack len(removePacks) + packsAddedByRepack
err = rebuildIndexFiles(gopts, repo, removePacks, nil, uint64(totalpacks)) err = rebuildIndexFiles(gopts, repo, removePacks, nil, uint64(totalpacks))
if err != nil { if err != nil {
return err return errors.Fatalf("%s", err)
} }
Verbosef("removing %d old packs\n", len(removePacks)) Verbosef("removing %d old packs\n", len(removePacks))