diff --git a/internal/sdk.go b/internal/sdk.go index c55c432c..0e950a5d 100644 --- a/internal/sdk.go +++ b/internal/sdk.go @@ -254,8 +254,12 @@ func (b *Sdk) PreUse(version Version, scope UseScope) (Version, error) { installedVersions = append(installedVersions, string(sdk.Main.Version)) } sort.Sort(installedVersions) - prefix := string(version) + "." + prefix := string(version) for _, v := range installedVersions { + if prefix == v { + newVersion = Version(v) + break + } if strings.HasPrefix(v, prefix) { newVersion = Version(v) break