🐛 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
2023-06-15 15:45:56 +02:00
committed by GitHub
parent 54d4f15c75
commit df9a60921b
3 changed files with 17 additions and 0 deletions
+7
View File
@@ -413,6 +413,13 @@ async function testGetVersionFromSpec() {
got = setupBeam.getVersionFromSpec(spec, versions)
assert.deepStrictEqual(got, expected)
simulateInput('version-type', before)
before = simulateInput('version-type', 'strict')
spec = '22.3.4.3'
expected = null
got = setupBeam.getVersionFromSpec(spec, versions)
assert.deepStrictEqual(got, expected)
simulateInput('version-type', before)
}
async function testParseVersionFile() {