Skip to content

Commit

Permalink
contrib/analyze-local-images: use exit(1) when there are vulnerabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin-M authored Mar 7, 2017
2 parents 84f74fa + 1216118 commit e103528
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contrib/analyze-local-images/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ func AnalyzeLocalImage(imageName string, minSeverity types.Priority, endpoint, m
fmt.Printf("%s No vulnerabilities were detected in your image\n", color.GreenString("Success!"))
} else if !hasVisibleVulnerabilities {
fmt.Printf("%s No vulnerabilities matching the minimum severity level were detected in your image\n", color.YellowString("NOTE:"))
}
} else {
return fmt.Errorf("A total of %d vulnerabilities have been detected in your image", len(vulnerabilities))
}

return nil
}
Expand Down

0 comments on commit e103528

Please sign in to comment.