From c793d0c1623ece97dd99a5eb01aaed5020e141d3 Mon Sep 17 00:00:00 2001 From: Jeff Ortel Date: Mon, 4 Dec 2023 10:09:49 -0800 Subject: [PATCH] :bug: Fix custom rules. Signed-off-by: Jeff Ortel --- cmd/rules.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cmd/rules.go b/cmd/rules.go index 483699f..41011bc 100644 --- a/cmd/rules.go +++ b/cmd/rules.go @@ -70,12 +70,23 @@ func (r *Rules) addFiles() (err error) { if err != nil { return } - r.rules = append(r.rules, ruleDir) + addon.Activity( + "[RULESET] fetching: %s", + r.Path) bucket := addon.Bucket() err = bucket.Get(r.Path, ruleDir) if err != nil { return } + entries, err := os.ReadDir(ruleDir) + if err != nil { + return + } + for _, ent := range entries { + r.rules = append( + r.rules, + path.Join(ruleDir, ent.Name())) + } return }