mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-19 14:46:39 +00:00
fix(expression): add validation for empty expression list in CEL (#545)
* fix(expression): add validation for empty ExpressionOrList Signed-off-by: Jason Cameron <git@jasoncameron.dev> * fix(imports): block empty file imports with improved error checking logic Signed-off-by: Jason Cameron <git@jasoncameron.dev> * docs(expression): improve validation to error on empty CEL expressions Signed-off-by: Jason Cameron <git@jasoncameron.dev> --------- Signed-off-by: Jason Cameron <git@jasoncameron.dev>
This commit is contained in:
@@ -224,7 +224,7 @@ func (is *ImportStatement) open() (fs.File, error) {
|
||||
func (is *ImportStatement) load() error {
|
||||
fin, err := is.open()
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't open %s: %w", is.Import, err)
|
||||
return fmt.Errorf("%w: %s: %w", ErrInvalidImportStatement, is.Import, err)
|
||||
}
|
||||
defer fin.Close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user