Skip to content

Commit

Permalink
Add new line and fix test to avoid having to change version twice (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
another-rex committed May 17, 2023
1 parent 1d78bbb commit dbeadde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cmd/osv-scanner/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/reporter/table_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit dbeadde

Please sign in to comment.