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 {
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...)
}