Change how we print installed Elixir version (#36)

This commit is contained in:
Wojtek Mach
2021-05-26 13:29:59 +02:00
committed by GitHub
parent b50aa18219
commit e332dc64ad
2 changed files with 8 additions and 4 deletions
+4 -2
View File
@@ -4780,11 +4780,13 @@ async function getElixirVersion(exSpec0, otpVersion) {
if (elixirVersions.get(elixirVersion).includes(otpMatch[1])) { if (elixirVersions.get(elixirVersion).includes(otpMatch[1])) {
// ... and it's available: use it! // ... and it's available: use it!
elixirVersionWithOTP = `${elixirVersion}-otp-${otpVersionMajor}` elixirVersionWithOTP = `${elixirVersion}-otp-${otpVersionMajor}`
core.info(`Using Elixir / -otp- version ${elixirVersionWithOTP}`) core.info(
`Using Elixir ${elixirVersion} (built for OTP ${otpVersionMajor})`,
)
} else { } else {
// ... and it's not available: fallback to the "generic" version (v1.4.5 only). // ... and it's not available: fallback to the "generic" version (v1.4.5 only).
elixirVersionWithOTP = elixirVersion elixirVersionWithOTP = elixirVersion
core.info(`Using Elixir ${elixirVersionWithOTP}`) core.info(`Using Elixir ${elixirVersion}`)
} }
} else { } else {
throw new Error( throw new Error(
+4 -2
View File
@@ -144,11 +144,13 @@ async function getElixirVersion(exSpec0, otpVersion) {
if (elixirVersions.get(elixirVersion).includes(otpMatch[1])) { if (elixirVersions.get(elixirVersion).includes(otpMatch[1])) {
// ... and it's available: use it! // ... and it's available: use it!
elixirVersionWithOTP = `${elixirVersion}-otp-${otpVersionMajor}` elixirVersionWithOTP = `${elixirVersion}-otp-${otpVersionMajor}`
core.info(`Using Elixir / -otp- version ${elixirVersionWithOTP}`) core.info(
`Using Elixir ${elixirVersion} (built for OTP ${otpVersionMajor})`,
)
} else { } else {
// ... and it's not available: fallback to the "generic" version (v1.4.5 only). // ... and it's not available: fallback to the "generic" version (v1.4.5 only).
elixirVersionWithOTP = elixirVersion elixirVersionWithOTP = elixirVersion
core.info(`Using Elixir ${elixirVersionWithOTP}`) core.info(`Using Elixir ${elixirVersion}`)
} }
} else { } else {
throw new Error( throw new Error(