[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:
hackercat
2021-03-31 11:38:11 +02:00
committed by GitHub
parent 726ef281c7
commit be806579bb
2 changed files with 6 additions and 5 deletions

View File

@@ -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 <ErlangCommand>" -TestCases $testCases {
param (
[string] $ErlangCommand
)
"$ErlangCommand -v" | Should -ReturnZeroExitCode
}
"$ErlangCommand" | Should -ReturnZeroExitCode
}
}
Describe "gcc" {