2
2
mirror of https://github.com/octoleo/restic.git synced 2024-05-29 07:00:49 +00:00

backup: Add warning when patterns do not match any files

This commit is contained in:
Alexander Neumann 2018-11-03 14:51:30 +01:00
parent a630d69e0c
commit c0572ca15f

View File

@ -315,6 +315,9 @@ func collectTargets(opts BackupOptions, args []string) (targets []string, err er
if err != nil { if err != nil {
return nil, errors.WithMessage(err, fmt.Sprintf("pattern: %s", line)) return nil, errors.WithMessage(err, fmt.Sprintf("pattern: %s", line))
} }
if len(expanded) == 0 {
Warnf("pattern %q does not match any files, skipping\n", line)
}
lines = append(lines, expanded...) lines = append(lines, expanded...)
} }