mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
fix: add color for error inside of log message (#6493)
This commit is contained in:
@@ -129,7 +129,7 @@ func (h *ColorHandler) appendAttr(buf []byte, a slog.Attr, groups []string) []by
|
||||
buf = append(buf, key...)
|
||||
buf = append(buf, '=')
|
||||
if err, ok := a.Value.Any().(error); ok {
|
||||
buf = strconv.AppendQuote(buf, color.HiRedString(err.Error()))
|
||||
buf = append(buf, color.HiRedString(strconv.Quote(err.Error()))...)
|
||||
} else {
|
||||
buf = append(buf, a.Value.String()...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user