Skip to content

Commit

Permalink
honor color flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Dec 10, 2024
1 parent 448383f commit 69460fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/crowdsec-cli/clidecision/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (cli *cliDecisions) decisionsTable(out io.Writer, alerts *models.GetAlertsR
}

duration := *decisionItem.Duration
if strings.HasPrefix(duration, "-") {
if strings.HasPrefix(duration, "-") && cli.cfg().Cscli.Color != "no" {
duration = color.RedString(duration)
}

Check warning on line 34 in cmd/crowdsec-cli/clidecision/table.go

View check run for this annotation

Codecov / codecov/patch

cmd/crowdsec-cli/clidecision/table.go#L33-L34

Added lines #L33 - L34 were not covered by tests

Expand Down

0 comments on commit 69460fd

Please sign in to comment.