diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index fabcc4989..89a07dcff 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -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 { diff --git a/images/linux/scripts/tests/Tools.Tests.ps1 b/images/linux/scripts/tests/Tools.Tests.ps1 index d35c7f634..8ec4deb31 100644 --- a/images/linux/scripts/tests/Tools.Tests.ps1 +++ b/images/linux/scripts/tests/Tools.Tests.ps1 @@ -110,15 +110,15 @@ Describe "Cmake" { } Describe "erlang" { - $testCases = @("erl", "erlc", "rebar3") | ForEach-Object { @{ErlangCommand = $_} } + $testCases = @("erl -version", "erlc -v", "rebar3 -v") | ForEach-Object { @{ErlangCommand = $_} } It "erlang " -TestCases $testCases { param ( [string] $ErlangCommand ) - "$ErlangCommand -v" | Should -ReturnZeroExitCode - } + "$ErlangCommand" | Should -ReturnZeroExitCode + } } Describe "gcc" {