Skip to content

Commit

Permalink
lca: adding a check for seedimage name (openshift-kni#438)
Browse files Browse the repository at this point in the history
Adding a check to the WithSeedImage function for non-empty
seedimage.

Signed-off-by: Alexander Chuzhoy <[email protected]>
  • Loading branch information
achuzhoy authored May 23, 2024
1 parent d22ce78 commit ca98df4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/lca/seedgenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ func (builder *SeedGeneratorBuilder) WithSeedImage(
return builder
}

if seedImage == "" {
glog.V(100).Infof("The name of the seedImage is empty")

builder.errorMsg = "seedImage 'name' cannot be empty"
}

glog.V(100).Infof("Setting seed image %s in seedgenerator", seedImage)

builder.Definition.Spec.SeedImage = seedImage
Expand Down

0 comments on commit ca98df4

Please sign in to comment.