Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmd/kosli/assertArtifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ func printAssertAsTable(raw string, out io.Writer, page int) error {
return err
}
scope := evaluationResult["scope"].(string)
isCompliant := evaluationResult["compliant"].(bool)

if evaluationResult["compliant"].(bool) {
if isCompliant {
logger.Info("COMPLIANT")
} else {
logger.Info("Error: NON-COMPLIANT")
Expand Down Expand Up @@ -245,5 +246,9 @@ func printAssertAsTable(raw string, out io.Writer, page int) error {
}
logger.Info(" See more details at %s", evaluationResult["html_url"].(string))
}

if !isCompliant {
return fmt.Errorf("Artifact is not compliant")
}
return nil
}