mirror of
https://github.com/erlef/setup-beam.git
synced 2026-10-31 01:56:23 +00:00
Override OTP version when specified in Elixir spec (#330)
This commit is contained in:
1 parent
98ad08a06d
commit
3e793a73ab
3 files changed
+20
-2
No files matched your search
+7
-1
@@ -184,7 +184,13 @@ async function getOTPVersion(otpSpec0, osVersion) {
|
||||
|
||||
async function getElixirVersion(exSpec0, otpVersion0) {
|
||||
const otpVersion = otpVersion0.match(/^([^-]+-)?(.+)$/)[2]
|
||||
const otpVersionMajor = otpVersion.match(/^([^.]+).*$/)[1]
|
||||
let otpVersionMajor = otpVersion.match(/^([^.]+).*$/)[1]
|
||||
|
||||
const userSuppliedOtp = exSpec0.match(/-otp-(\d+)/)?.[1] ?? null
|
||||
|
||||
if (userSuppliedOtp && isVersion(userSuppliedOtp)) {
|
||||
otpVersionMajor = userSuppliedOtp
|
||||
}
|
||||
|
||||
const [otpVersionsForElixirMap, elixirVersions] = await getElixirVersions()
|
||||
const spec = exSpec0.replace(/-otp-.*$/, '')
|
||||
|
||||
Reference in new issue
Block a user