mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-14 13:56:47 +00:00
[Ubuntu] Fix Erlang version in software report
SoftwareReport collects wrong version for Erlang, it reports Eshell version rather than Erlang itself. reference: https://stackoverflow.com/questions/9560815/how-to-get-erlangs-release-version-number-from-a-shell 2nd answer `erl` doesn't have `-v` flag, only `-version` `erlc` `-v` flag is for verbose output `rebar3` reports it's version with flag `-v` Change `erl -v` to `erl -version` as it gets stuck in certain scenarios like using Docker as packer builder. reference: http://erlang.org/doc/man/erl.html
This commit is contained in:
@@ -34,8 +34,9 @@ function Get-ClangVersions {
|
||||
}
|
||||
|
||||
function Get-ErlangVersion {
|
||||
$version = (erl -eval 'erlang:display(erlang:system_info(version)), halt().' -noshell).Trim('"')
|
||||
return "Erlang $version"
|
||||
$erlangVersion = (erl -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), ''OTP_VERSION''])), io:fwrite(Version), halt().' -noshell)
|
||||
$shellVersion = (erl -eval 'erlang:display(erlang:system_info(version)), halt().' -noshell).Trim('"')
|
||||
return "Erlang $erlangVersion (Eshell $shellVersion)"
|
||||
}
|
||||
|
||||
function Get-MonoVersion {
|
||||
|
||||
Reference in New Issue
Block a user