mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
00e4b0025f
When we parse modules we won’t get an error back if the module contents is empty, but we do get back a `nil` module value. In the bundle loader we need to catch this before going further with trying to load the module as it is not actually a valid module and will break assumptions made about it. According to the docs Modules must, at a minimum, have a package declaration. With that in mind this seems like the right behavior to enforce on the bundled rego files since we treat them as modules. Fixes: #1393 Signed-off-by: Patrick East <east.patrick@gmail.com>