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:
parent
d2a4adebdd
commit
9fc20077a1
@ -41,7 +41,9 @@ func evalInclude(ctx ExprContext, self *term) (v any, err error) {
|
|||||||
}
|
}
|
||||||
} else if IsString(childValue) {
|
} else if IsString(childValue) {
|
||||||
filePath, _ := childValue.(string)
|
filePath, _ := childValue.(string)
|
||||||
v, err = EvalFile(ctx, filePath)
|
if v, err = EvalFile(ctx, filePath); err == nil {
|
||||||
|
count++
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
err = self.errIncompatibleType(childValue)
|
err = self.errIncompatibleType(childValue)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user