forked from TrueCloudLab/restic
check: improve error on damaged index
Always return the `repository contains errors` message if a repository is damaged and must be repaired. Also provide specific instructions how to repair the index.
This commit is contained in:
parent
a03e00373c
commit
fdc7349aa4
1 changed files with 3 additions and 1 deletions
|
@ -274,7 +274,9 @@ func runCheck(ctx context.Context, opts CheckOptions, gopts GlobalOptions, args
|
|||
for _, err := range errs {
|
||||
printer.E("error: %v\n", err)
|
||||
}
|
||||
return errors.Fatal("LoadIndex returned errors")
|
||||
|
||||
printer.E("\nThe repository index is damaged and must be repaired. You must run `restic repair index' to correct this.\n\n")
|
||||
return errors.Fatal("repository contains errors")
|
||||
}
|
||||
|
||||
orphanedPacks := 0
|
||||
|
|
Loading…
Reference in a new issue