Skip to content

Commit

Permalink
🐛 Fix custom rules.
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Ortel <jortel@redhat.com>
  • Loading branch information
jortel committed Dec 4, 2023
1 parent 87a0c06 commit c793d0c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cmd/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit c793d0c

Please sign in to comment.