diff --git a/pkg/rego/embed.go b/pkg/rego/embed.go index 3a3076934..1c388cf08 100644 --- a/pkg/rego/embed.go +++ b/pkg/rego/embed.go @@ -79,7 +79,7 @@ func LoadPoliciesFromDirs(target fs.FS, paths ...string) (map[string]*ast.Module return nil } - if strings.HasSuffix(filepath.Dir(filepath.ToSlash(path)), "advanced/optional") { + if strings.HasSuffix(filepath.Dir(filepath.ToSlash(path)), filepath.Join("advanced", "optional")) { return fs.SkipDir }