🐛 Fix OTP version null check (#211)

* Fix OTP version null check

* Revert "Fix OTP version null check"

This reverts commit 2c433c16ac.

* Check that the resolved versions contain the spec.

* Only perform semver version resolution when spec is not an rc and version-type is not strict

* Move version inclusion check to the end of the function, when we may have prepended a 'v'

* Refactor function return

* Add test case for strict version resolving a spec that is no available version
This commit is contained in:
Christoph Grothaus authored and GitHub committed 2023-06-15 14:45:56 +01:00
1 parent 54d4f15c75
commit df9a60921b
3 files changed
+17

No files matched your search

+5
View File
@@ -10247,6 +10247,11 @@ function getVersionFromSpec(spec, versions, maybePrependWithV0) {
if (maybePrependWithV0 && v != null) {
v = maybePrependWithV(v)
}
if (!versions.includes(v)) {
v = null
}
return v
}