mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-29 11:10:48 +00:00
Coerce non-semver into semver (#34)
This commit is contained in:
+4
-1
@@ -184,7 +184,10 @@ async function getOTPVersions(osVersion) {
|
||||
.forEach((line) => {
|
||||
const otpMatch = line.match(/^(OTP-)?([^ ]+)/)
|
||||
|
||||
const otpVersion = otpMatch[2]
|
||||
let otpVersion = otpMatch[2]
|
||||
if (semver.validRange(otpVersion)) {
|
||||
otpVersion = semver.minVersion(otpVersion).version
|
||||
}
|
||||
otpVersions.set(otpVersion, otpMatch[0]) // we keep the original for later reference
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user