From 1029fe6dd0f75d1484ba3a5b83debb0a8b9bed3f Mon Sep 17 00:00:00 2001 From: Michael Eischer <9106997+MichaelEischer@users.noreply.github.com> Date: Sun, 21 Jun 2026 15:27:19 +0200 Subject: [PATCH] list packs snapshot: include actual error in error message (#21903) --- cmd/restic/cmd_list.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/restic/cmd_list.go b/cmd/restic/cmd_list.go index 86687ed72..781251d68 100644 --- a/cmd/restic/cmd_list.go +++ b/cmd/restic/cmd_list.go @@ -97,9 +97,11 @@ func runList(ctx context.Context, gopts global.Options, args []string, term ui.T // packfileList handles the list packs variant. // It prints a sorted list of packfiles belonging to this snapshot. func packfileList(ctx context.Context, repo restic.Repository, snapshotID string, printer restic.Printer) error { + // ignore subpaths as this command is intended to list all packfiles necessary to restore the snapshot + // subpaths would require special handling and limit restorability sn, _, err := (&data.SnapshotFilter{}).FindLatest(ctx, repo, repo, snapshotID) if err != nil { - return fmt.Errorf("required snapshot ID %q not found", snapshotID) + return fmt.Errorf("failed to find snapshot: %v", err) } if err = repo.LoadIndex(ctx, printer); err != nil {