From 027a51529dfcf5fe2d787d3a003ba8a104e92cba Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 31 Jan 2021 11:31:27 +0100 Subject: [PATCH] prune: Improve error message for missing files This commit changes the error message so that a list of file names is printed. Before, just the raw map was printed, which is not a great user interface. --- cmd/restic/cmd_prune.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/restic/cmd_prune.go b/cmd/restic/cmd_prune.go index 9a415c61d..c97ee502a 100644 --- a/cmd/restic/cmd_prune.go +++ b/cmd/restic/cmd_prune.go @@ -383,7 +383,10 @@ func prune(opts PruneOptions, gopts GlobalOptions, repo restic.Repository, usedB } if len(indexPack) != 0 { - Warnf("The index references needed pack files which are missing from the repository: %v\n", indexPack) + Warnf("The index references %d needed pack files which are missing from the repository:\n", len(indexPack)) + for id := range indexPack { + Warnf(" %v\n", id) + } return errorPacksMissing } if len(ignorePacks) != 0 {