mirror of
https://github.com/restic/restic.git
synced 2025-08-15 06:17:34 +00:00
backup: Add warning when patterns do not match any files
This commit is contained in:
@@ -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...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user