mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-24 01:26:47 +01:00
Handle no matches
This commit is contained in:
parent
12f594779c
commit
d1216f409d
1 changed files with 4 additions and 0 deletions
|
@ -194,6 +194,10 @@ func (p *parser) doImport() error {
|
|||
return p.Errf("Failed to use import pattern %s - %s", importPattern, err.Error())
|
||||
}
|
||||
|
||||
if len(matches) == 0 {
|
||||
return p.Errf("No files matching the import pattern %s", importPattern)
|
||||
}
|
||||
|
||||
for _, importFile := range matches {
|
||||
if err := p.doSingleImport(importFile); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue