diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 0bb3eea..8cff1a9 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -116,6 +116,7 @@ jobs: - elixir-version: 'master' otp-version: '25' os: 'ubuntu-20.04' + version-type: 'strict' - gleam-version: 'nightly' otp-version: '24' - gleam-version: '0.23' diff --git a/__tests__/setup-beam.test.js b/__tests__/setup-beam.test.js index b3af58d..8848a25 100644 --- a/__tests__/setup-beam.test.js +++ b/__tests__/setup-beam.test.js @@ -171,8 +171,8 @@ async function testElixirVersions() { let otpVersion spec = '1.1.x' - otpVersion = 'OTP-23' - expected = 'v1.1.1' + otpVersion = 'OTP-17' + expected = 'v1.1.1-otp-17' got = await setupBeam.getElixirVersion(spec, otpVersion) assert.deepStrictEqual(got, expected) diff --git a/dist/index.js b/dist/index.js index 1d2d0cd..e1cf030 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7358,9 +7358,11 @@ async function getElixirVersion(exSpec0, otpVersion) { `Using Elixir ${elixirVersion} (built for OTP ${otpVersionMajor})`, ) } else { - // ... and it's not available: fallback to the 'generic' version (v1.4.5 only). - elixirVersionWithOTP = elixirVersion - core.info(`Using Elixir ${elixirVersion}`) + // ... and it's not available: exit with exception + throw new Error( + `Requested Elixir / Erlang/OTP version (${exSpec0} / ${otpVersion}) not ` + + 'found in version list (did you check Compatibility between Elixir and Erlang/OTP?)', + ) } } else { throw new Error( diff --git a/src/setup-beam.js b/src/setup-beam.js index ac9fbfc..26452f0 100644 --- a/src/setup-beam.js +++ b/src/setup-beam.js @@ -188,9 +188,11 @@ async function getElixirVersion(exSpec0, otpVersion) { `Using Elixir ${elixirVersion} (built for OTP ${otpVersionMajor})`, ) } else { - // ... and it's not available: fallback to the 'generic' version (v1.4.5 only). - elixirVersionWithOTP = elixirVersion - core.info(`Using Elixir ${elixirVersion}`) + // ... and it's not available: exit with exception + throw new Error( + `Requested Elixir / Erlang/OTP version (${exSpec0} / ${otpVersion}) not ` + + 'found in version list (did you check Compatibility between Elixir and Erlang/OTP?)', + ) } } else { throw new Error(