Skip to content

Commit

Permalink
🐛 fix junit reporter panic
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <ivan@mondoo.com>
  • Loading branch information
imilchev committed Apr 30, 2024
1 parent 50fcabe commit 519ec6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/reporter/junit.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ func ConvertToJunit(r *policy.ReportCollection, out shared.OutputHelper) error {
suites.Suites = append(suites.Suites, ts)
}

if r.Bundle == nil {
return fmt.Errorf("no policy bundle found")
}

bundle := r.Bundle.ToMap()
queries := bundle.QueryMap()

Expand Down

0 comments on commit 519ec6f

Please sign in to comment.