check: point users towards the troubleshooting guide if repo has errors

This commit is contained in:
Michael Eischer 2024-06-30 11:08:52 +02:00
parent c9a4a95848
commit 6d9dfff1cb

View file

@ -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")