Skip to content

Commit

Permalink
Only validate for API versions 0.5 and 0.6
Browse files Browse the repository at this point in the history
libcnb is only supported for versions 0.5+ and we check for it a few lines above. Removing some unnecessary checks

Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
  • Loading branch information
sambhav authored Jan 11, 2022
1 parent 896a63b commit 2d891dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func Build(builder Builder, options ...Option) {
}
}

if API != "0.1" && API != "0.2" && API != "0.3" && API != "0.4" && API != "0.5" && API != "0.6" {
if API != "0.5" && API != "0.6" {
if err := validateSBOMFormats(ctx.Layers.Path, ctx.Buildpack.Info.SBOMFormats); err != nil {
config.exitHandler.Error(fmt.Errorf("unable to validate SBOM\n%w", err))
return
Expand Down

0 comments on commit 2d891dd

Please sign in to comment.