diff --git a/commands/report.go b/commands/report.go index 760ee31d..dbc86ba7 100644 --- a/commands/report.go +++ b/commands/report.go @@ -364,6 +364,10 @@ func (p *ReportCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{} } history, err := loadOneScanHistory(jsonDir) + if err != nil { + util.Log.Error(err) + return subcommands.ExitFailure + } var results []models.ScanResult for _, r := range history.ScanResults {