From 692b3b79cf99b8a978607a6ebc476bcf7b9fe709 Mon Sep 17 00:00:00 2001 From: Nikita Pivkin Date: Fri, 26 Jan 2024 18:10:23 +0700 Subject: [PATCH] fix(rego): skip optional policies in windows --- pkg/rego/embed.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }