Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Ortel <[email protected]>
  • Loading branch information
jortel committed Aug 7, 2024
1 parent 3b9bf34 commit 38cfcf5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ func (r *Rules) ensureRuleSet() (err error) {
_ = f.Close()
}()
en := yaml.NewEncoder(f)
err = en.Encode(map[string]any{"name": path.Base(p)})
part := strings.Split(p, "/")
name := strings.Join(part, "-")
err = en.Encode(map[string]any{"name": name})
return
}
for _, ruleDir := range r.rules {
Expand All @@ -330,7 +332,7 @@ func (r *Rules) ensureRuleSet() (err error) {
continue
}
if os.IsNotExist(err) {
err = create(ruleDir)
err = create(p)
if err != nil {
return
}
Expand Down

0 comments on commit 38cfcf5

Please sign in to comment.