Skip to content

Commit

Permalink
fix rare issue causing logger color selection to go crazy and panic
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Aug 28, 2023
1 parent 702221b commit 669250a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/executor/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (s *colorizedWriter) hostColorizer(host string) func(format string, a ...in
color.FgRed, color.FgGreen, color.FgYellow,
color.FgBlue, color.FgMagenta, color.FgCyan,
}
i := crc32.ChecksumIEEE([]byte(host)) % uint32(len(colors))
i := int(crc32.ChecksumIEEE([]byte(host))) % len(colors)
c := colors[i]
if s.monochrome {
c = color.Reset
Expand Down

0 comments on commit 669250a

Please sign in to comment.