From 5625cdb126895ed97f8a61156813b8d5f79c9c3a Mon Sep 17 00:00:00 2001 From: Zeyuan Cao Date: Tue, 11 Apr 2023 11:31:41 -0400 Subject: [PATCH] default semver constraint for empty string Signed-off-by: Zeyuan Cao --- pkg/image/version.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/image/version.go b/pkg/image/version.go index 7613e4b9..3e5c845f 100644 --- a/pkg/image/version.go +++ b/pkg/image/version.go @@ -123,6 +123,10 @@ func (img *ContainerImage) GetNewestVersionFromTags(vc *VersionConstraint, tagLi return nil, err } } + } else if vc.Strategy == StrategySemVer { + // The is the special case where an empty string was passed in which + // is equivalent to * or >=0.0.0 + semverConstraint, _ = semver.NewConstraint("*") } }