Skip to content

Commit

Permalink
Added step to check the scan status and exit (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-nanduri authored Jul 12, 2021
1 parent 37b2681 commit b4862f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/commands/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,12 @@ func isScanRunning(scansWrapper wrappers.ScansWrapper, scanID string) bool {
return true
}
}
if scanResponseModel.Status != "Completed" {
fmt.Println("Scan Finished with status: ", scanResponseModel.Status)
os.Exit(1)
}
fmt.Println("Scan finished, final status: ", scanResponseModel.Status)

return false
}

Expand Down

0 comments on commit b4862f7

Please sign in to comment.