fix(report): return severity colors in table format (#4969)

* use xio.NopCloser to compare with os.Stdout

* fmt of import
This commit is contained in:
DmitriyLewen
2023-08-10 09:58:42 +06:00
committed by GitHub
parent bc2b0ca6c3
commit f105279989

View File

@@ -16,6 +16,7 @@ import (
"github.com/aquasecurity/table"
dbTypes "github.com/aquasecurity/trivy-db/pkg/types"
"github.com/aquasecurity/trivy/pkg/types"
xio "github.com/aquasecurity/trivy/pkg/x/io"
)
var (
@@ -137,7 +138,7 @@ func IsOutputToTerminal(output io.Writer) bool {
return false
}
if output != os.Stdout {
if output != xio.NopCloser(os.Stdout) {
return false
}
o, err := os.Stdout.Stat()