Skip to content

Commit f105279

Browse files
authored
fix(report): return severity colors in table format (#4969)
* use xio.NopCloser to compare with os.Stdout * fmt of import
1 parent bc2b0ca commit f105279

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/report/table/table.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"github.com/aquasecurity/table"
1717
dbTypes "github.com/aquasecurity/trivy-db/pkg/types"
1818
"github.com/aquasecurity/trivy/pkg/types"
19+
xio "github.com/aquasecurity/trivy/pkg/x/io"
1920
)
2021

2122
var (
@@ -137,7 +138,7 @@ func IsOutputToTerminal(output io.Writer) bool {
137138
return false
138139
}
139140

140-
if output != os.Stdout {
141+
if output != xio.NopCloser(os.Stdout) {
141142
return false
142143
}
143144
o, err := os.Stdout.Stat()

0 commit comments

Comments
 (0)