Add ability to report warnings to terminal

Report warnings to terminal when unrecognized generic attributes are found in the repository.
This commit is contained in:
Aneesh Nireshwalia
2024-02-22 17:52:26 -07:00
parent 0962917974
commit eeb1aa5388
9 changed files with 26 additions and 22 deletions
+3
View File
@@ -178,6 +178,9 @@ func runRestore(ctx context.Context, opts RestoreOptions, gopts GlobalOptions,
totalErrors++
return nil
}
res.Warn = func(message string) {
msg.E("Warning: %s\n", message)
}
excludePatterns := filter.ParsePatterns(opts.Exclude)
insensitiveExcludePatterns := filter.ParsePatterns(opts.InsensitiveExclude)