Skip to content

Commit

Permalink
Add variants.isNotEmpty check to OciImage
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Jul 16, 2024
1 parent fb00cee commit 6485587
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ internal class OciImage(
val config: OciDataDescriptor,
val platform: Platform,
val variants: List<OciVariant>,
)
) {
init {
require(variants.isNotEmpty()) { "variants must not be empty" }
}
}

internal class OciVariant(
val metadata: OciMetadata,
Expand Down

0 comments on commit 6485587

Please sign in to comment.