Skip to content

Commit

Permalink
Merge pull request #32 from arminc/fix-exit-code
Browse files Browse the repository at this point in the history
Exit code is 1 when there is a vulnerability
  • Loading branch information
arminc authored Oct 29, 2017
2 parents 1b06290 + bd41fce commit 0560df2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ func main() {
log.Fatalf("Application interrupted [%v]", s)
})

scan(scannerConfig{*imageName, whitelist, *clair, *ip, *reportFile})
result := scan(scannerConfig{*imageName, whitelist, *clair, *ip, *reportFile})
if len(result) > 0 {
os.Exit(1)
}
}
app.Run(os.Args)
}
Expand Down

0 comments on commit 0560df2

Please sign in to comment.