diff --git a/pkg/reporter/vertical_reporter.go b/pkg/reporter/vertical_reporter.go index e5d44c596cd..755c9809f70 100644 --- a/pkg/reporter/vertical_reporter.go +++ b/pkg/reporter/vertical_reporter.go @@ -6,6 +6,7 @@ import ( "github.com/google/osv-scanner/internal/output" "github.com/google/osv-scanner/pkg/models" + "github.com/jedib0t/go-pretty/v6/text" ) type VerticalReporter struct { @@ -62,6 +63,10 @@ func (r *VerticalReporter) PrintResult(vulnResult *models.VulnerabilityResults) return nil } + if r.terminalWidth <= 0 { + text.DisableColors() + } + output.PrintVerticalResults(vulnResult, r.stdout) return nil