operator-include.go: the include operator did not count the number of files included when its argument was a single string

This commit is contained in:
Celestino Amoroso 2024-07-06 16:08:58 +02:00
parent d2a4adebdd
commit 9fc20077a1

View File

@ -41,7 +41,9 @@ func evalInclude(ctx ExprContext, self *term) (v any, err error) {
}
} else if IsString(childValue) {
filePath, _ := childValue.(string)
v, err = EvalFile(ctx, filePath)
if v, err = EvalFile(ctx, filePath); err == nil {
count++
}
} else {
err = self.errIncompatibleType(childValue)
}