From 150c886b9e997a7ae7d56eeda0118329c3a74718 Mon Sep 17 00:00:00 2001 From: Nikita Pivkin Date: Sat, 27 Jan 2024 08:10:22 +0700 Subject: [PATCH] fix(rego): skip optional policies in windows (#1529) --- 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 }