diff --git a/images/macos/software-report/SoftwareReport.Common.psm1 b/images/macos/software-report/SoftwareReport.Common.psm1 index 449135ca..2145290a 100644 --- a/images/macos/software-report/SoftwareReport.Common.psm1 +++ b/images/macos/software-report/SoftwareReport.Common.psm1 @@ -72,8 +72,12 @@ function Get-FortranVersion { } function Get-ClangLLVMVersion { - $clangLLVMVersion = Run-Command "$(brew --prefix llvm)/bin/clang --version" | Select-Object -First 1 | Take-Part -Part 2 - "Clang/LLVM $clangLLVMVersion" + $locationsList = @("$((Get-Command clang).Source)", '$(brew --prefix llvm)/bin/clang') + $locationsList | Foreach-Object { + (Run-Command "${_} --version" | Out-String) -match "(?\d+\.\d+\.\d+)" | Out-Null + $version = $Matches.version + "Clang/LLVM $version " + $(if(${_} -Match "brew") {"is available on ``${_}``"} else {"is default"}) + } } function Get-NVMVersion {