mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-22 22:56:07 +00:00
Coerce non-semver into semver (#34)
This commit is contained in:
committed by
GitHub
parent
d2707f347b
commit
a550a4c889
Vendored
+4
-1
@@ -4791,7 +4791,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