mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-05 12:00:29 +08:00
Handle no matches
This commit is contained in:
@ -194,6 +194,10 @@ func (p *parser) doImport() error {
|
|||||||
return p.Errf("Failed to use import pattern %s - %s", importPattern, err.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 {
|
for _, importFile := range matches {
|
||||||
if err := p.doSingleImport(importFile); err != nil {
|
if err := p.doSingleImport(importFile); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Reference in New Issue
Block a user