Skip to content

Commit 5625cdb

Browse files
zywillcchengfang
authored andcommitted
default semver constraint for empty string
Signed-off-by: Zeyuan Cao <[email protected]>
1 parent 4f21ade commit 5625cdb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/image/version.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ func (img *ContainerImage) GetNewestVersionFromTags(vc *VersionConstraint, tagLi
123123
return nil, err
124124
}
125125
}
126+
} else if vc.Strategy == StrategySemVer {
127+
// The is the special case where an empty string was passed in which
128+
// is equivalent to * or >=0.0.0
129+
semverConstraint, _ = semver.NewConstraint("*")
126130
}
127131
}
128132

0 commit comments

Comments
 (0)