forked from TrueCloudLab/restic
backup: Add warning when patterns do not match any files
This commit is contained in:
parent
a630d69e0c
commit
c0572ca15f
1 changed files with 3 additions and 0 deletions
|
@ -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...)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue