Skip to content

Commit

Permalink
Fix error reporting on image deletions
Browse files Browse the repository at this point in the history
Signed-off-by: Chris <[email protected]>
  • Loading branch information
ccremer committed Apr 14, 2020
1 parent 44b9f53 commit 965c05a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ func DeleteImages(imageTags []string, imageName string, namespace string, force
"imageTag": inactiveTag,
})
if force {
if err := openshift.DeleteImageStreamTag(namespace, openshift.BuildImageStreamTagName(imageName, inactiveTag)); err != nil {
if err := openshift.DeleteImageStreamTag(namespace, openshift.BuildImageStreamTagName(imageName, inactiveTag)); err == nil {
logEvent.Info("Deleted image tag")
} else {
logEvent.Error("Could not delete image tag")
logEvent.WithError(err).Error("Could not delete image tag")
}
} else {
logEvent.Info("Would delete image tag")
Expand Down

0 comments on commit 965c05a

Please sign in to comment.