mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-23 07:06:07 +00:00
🐛 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:
committed by
GitHub
parent
54d4f15c75
commit
df9a60921b
@@ -375,6 +375,11 @@ function getVersionFromSpec(spec, versions, maybePrependWithV0) {
|
||||
if (maybePrependWithV0 && v != null) {
|
||||
v = maybePrependWithV(v)
|
||||
}
|
||||
|
||||
if (!versions.includes(v)) {
|
||||
v = null
|
||||
}
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user