mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-28 10:40:49 +00:00
Ease Elixir escripts execution by adding ${HOME}/.mix/escripts to path (#153)
* feat: add escripts to path * Update src/install-elixir.ps1 Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com> * add github action combo to test escript * force install * use os homedir for escript install path Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
This commit is contained in:
co-authored by
Paulo F. Oliveira
parent
c373088147
commit
b980a5ac9b
@@ -18,4 +18,7 @@ $ProgressPreference="Continue"
|
||||
Write-Output "Installed Elixir version follows"
|
||||
& "${DIR_FOR_BIN}/bin/elixir" "-v" | Write-Output
|
||||
|
||||
$ProgressPreference="Continue"
|
||||
New-Item "%UserProfile%/.mix/escripts" -ItemType Directory | Out-Null
|
||||
|
||||
"INSTALL_DIR_FOR_ELIXIR=${Env:RUNNER_TEMP}/${DIR_FOR_BIN}" | Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
|
||||
|
||||
@@ -15,4 +15,6 @@ unzip -q -o -d "${DIR_FOR_BIN}" "${FILE_OUTPUT}"
|
||||
echo "Installed Elixir version follows"
|
||||
${DIR_FOR_BIN}/bin/elixir -v
|
||||
|
||||
mkdir -p "${HOME}/.mix/escripts"
|
||||
|
||||
echo "INSTALL_DIR_FOR_ELIXIR=${RUNNER_TEMP}/${DIR_FOR_BIN}" >> "${GITHUB_ENV}"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const core = require('@actions/core')
|
||||
const { exec } = require('@actions/exec')
|
||||
const os = require('os')
|
||||
const path = require('path')
|
||||
const semver = require('semver')
|
||||
const https = require('https')
|
||||
@@ -76,6 +77,7 @@ async function maybeInstallElixir(elixirSpec, otpVersion) {
|
||||
`##[add-matcher]${path.join(matchersPath, 'elixir-matchers.json')}`,
|
||||
)
|
||||
}
|
||||
core.addPath(`${os.homedir()}/.mix/escripts`)
|
||||
core.addPath(`${process.env.RUNNER_TEMP}/.setup-beam/elixir/bin`)
|
||||
console.log('##[endgroup]')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user