Skip to content

Commit

Permalink
document usage silence behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
David Gamero committed May 20, 2024
1 parent a3479b5 commit dee8b11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (vc *validateCmd) run(c *cobra.Command) error {
}

if anyViolationsFound {
c.SilenceUsage = true
c.SilenceUsage = true // suppress default Cobra behaviour of printing usage on all errors
return fmt.Errorf("violations found")
} else {
log.Printf("✅ No violations found in \"%s\".", vc.manifestPath)
Expand Down

0 comments on commit dee8b11

Please sign in to comment.