Skip to content

Commit

Permalink
Don't determine default tag if bundles is referenced using digest
Browse files Browse the repository at this point in the history
If a bundle is referenced explicitly using a tag or a digest, we should
not try to use the default tag

Signed-off-by: Kim Christensen <kimworking@gmail.com>
  • Loading branch information
kichristensen committed May 18, 2024
1 parent 67f1dd8 commit d97d0ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cnab/extended_bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ func (b *ExtendedBundle) ResolveVersionv2(name string, dep v2.Dependency) (OCIRe
}

if dep.Version == "" {
// Check if they specified an explicit tag in referenced bundle already
if ref.HasTag() {
// Check if they specified an explicit tag or digest in referenced bundle already
if ref.HasTag() || ref.HasDigest() {
return ref, nil
}

Expand Down

0 comments on commit d97d0ec

Please sign in to comment.