Fix install-hex / install-rebar

* Correctly check for strings in core.getInput() return value
* Add otp/bin to PATH to get compatible versions
This commit is contained in:
Eric Meadows-Jönsson
2020-01-23 22:52:50 +01:00
committed by GitHub
parent 05577888e7
commit 3f153648ab

View File

@@ -21,9 +21,9 @@ async function main() {
)
let installHex = core.getInput('install-hex')
installHex = installHex == null ? true : installHex
installHex = installHex == null ? 'true' : installHex
let installRebar = core.getInput('install-rebar')
installRebar = installRebar == null ? true : installRebar
installRebar = installRebar == null ? 'true' : installRebar
console.log(`##[group]Installing OTP ${otpVersion}`)
await installOTP(otpVersion)
@@ -33,10 +33,10 @@ async function main() {
await installElixir(elixirVersion, otpMajor)
console.log(`##[endgroup]`)
process.env.PATH = `/tmp/.setup-elixir/elixir/bin:${process.env.PATH}`
process.env.PATH = `/tmp/.setup-elixir/elixir/bin:/tmp/.setup-elixir/otp/bin:${process.env.PATH}`
if (installRebar) await exec('mix local.rebar --force')
if (installHex) await exec('mix local.hex --force')
if (installRebar === 'true') await exec('mix local.rebar --force')
if (installHex === 'true') await exec('mix local.hex --force')
const matchersPath = path.join(__dirname, '..', '.github')
console.log(`##[add-matcher]${path.join(matchersPath, 'elixir.json')}`)