Skip to content

Commit

Permalink
fixup! trishank comment
Browse files Browse the repository at this point in the history
Signed-off-by: Aditya Sirish <[email protected]>
  • Loading branch information
adityasaky committed Feb 23, 2024
1 parent 7e48189 commit 855cb4b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion verifier/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,13 @@ func applyAttributeRules(env *cel.Env, input interpreter.Activation, rules []Con
switch result := out.Value().(type) {
case bool:
if !result {
message := fmt.Sprintf("verification failed for rule '%s'", r.Rule)
var message string
if r.Debug != "" {
message = fmt.Sprintf("%s\nin rule '%s'", r.Debug, r.Rule)
} else {
message = fmt.Sprintf("verification failed for rule '%s'", r.Rule)
}

if !r.Warn {
return fmt.Errorf(message)
}
Expand Down

0 comments on commit 855cb4b

Please sign in to comment.