diff --git a/cmd/osv-scanner/main_test.go b/cmd/osv-scanner/main_test.go index 04b768d441..978ddc4c48 100644 --- a/cmd/osv-scanner/main_test.go +++ b/cmd/osv-scanner/main_test.go @@ -117,11 +117,11 @@ func TestRun(t *testing.T) { name: "", args: []string{"", "--version"}, wantExitCode: 0, - wantStdout: ` - osv-scanner version: 1.3.3 + wantStdout: fmt.Sprintf(` + osv-scanner version: %s commit: n/a built at: n/a - `, + `, version), wantStderr: "", }, // one specific supported lockfile diff --git a/pkg/reporter/table_reporter.go b/pkg/reporter/table_reporter.go index bb24bea4db..69d07db4f7 100644 --- a/pkg/reporter/table_reporter.go +++ b/pkg/reporter/table_reporter.go @@ -39,7 +39,7 @@ func (r *TableReporter) PrintText(msg string) { func (r *TableReporter) PrintResult(vulnResult *models.VulnerabilityResults) error { if len(vulnResult.Results) == 0 && !r.hasPrintedError { - fmt.Fprintf(r.stdout, "No vulnerabilities found") + fmt.Fprintf(r.stdout, "No vulnerabilities found\n") return nil }