From 6d9dfff1cbe18846cb079f4c76b20910af907f73 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 30 Jun 2024 11:08:52 +0200 Subject: [PATCH] check: point users towards the troubleshooting guide if repo has errors --- cmd/restic/cmd_check.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/restic/cmd_check.go b/cmd/restic/cmd_check.go index 89bb30868..ffb97ccdb 100644 --- a/cmd/restic/cmd_check.go +++ b/cmd/restic/cmd_check.go @@ -431,6 +431,9 @@ func runCheck(ctx context.Context, opts CheckOptions, gopts GlobalOptions, args } if errorsFound { + if len(salvagePacks) == 0 { + printer.E("\nThe repository is damaged and must be repaired. Please follow the troubleshooting guide at https://restic.readthedocs.io/en/stable/077_troubleshooting.html .\n\n") + } return errors.Fatal("repository contains errors") } printer.P("no errors were found\n")