Merge pull request #4946 from mikix/json-errors

Improve error handling in --json mode
This commit is contained in:
Michael Eischer authored and GitHub committed 2024-08-10 17:04:56 +00:00
commit 05571286b2
18 files changed
+269 -80

No files matched your search

+1 -2
View File
@@ -164,9 +164,8 @@ func runRestore(ctx context.Context, opts RestoreOptions, gopts GlobalOptions,
totalErrors := 0
res.Error = func(location string, err error) error {
msg.E("ignoring error for %s: %s\n", location, err)
totalErrors++
return nil
return progress.Error(location, err)
}
res.Warn = func(message string) {
msg.E("Warning: %s\n", message)