mirror of
https://github.com/octoleo/restic.git
synced 2025-01-23 15:18:31 +00:00
backup: Add warning when patterns do not match any files
This commit is contained in:
parent
a630d69e0c
commit
c0572ca15f
@ -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...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user