Fix bug handling plugins with no Process method
This commit is contained in:
parent
9aba24e892
commit
a197b40f61
19
context.go
19
context.go
@ -96,21 +96,22 @@ func (context *Context) step() {
|
|||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
for inputFile := range context.inputFiles {
|
for inputFile := range context.inputFiles {
|
||||||
accept := processor != nil
|
|
||||||
|
|
||||||
var fileFilters []Filter
|
var fileFilters []Filter
|
||||||
fileFilters = append(fileFilters, context.fileFilters...)
|
fileFilters = append(fileFilters, context.fileFilters...)
|
||||||
if filter != nil {
|
if filter != nil {
|
||||||
fileFilters = append(fileFilters, filter)
|
fileFilters = append(fileFilters, filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, fileFilter := range fileFilters {
|
var accept bool
|
||||||
if accept, err = fileFilter.Accept(inputFile); err != nil {
|
if processor != nil {
|
||||||
context.goldsmith.fault(fileFilter.Name(), inputFile, err)
|
for _, fileFilter := range fileFilters {
|
||||||
return
|
if accept, err = fileFilter.Accept(inputFile); err != nil {
|
||||||
}
|
context.goldsmith.fault(fileFilter.Name(), inputFile, err)
|
||||||
if !accept {
|
return
|
||||||
break
|
}
|
||||||
|
if !accept {
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user