diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 267dcac3a..c9257407f 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -6,8 +6,7 @@ function Get-OSName { function Get-CPPVersions { $cppVersions = apt list --installed 2>&1 | Where-Object { $_ -match "g\+\+-\d+"} | ForEach-Object { - $_ -match "now (?\d+\.\d+\.\d+)-" | Out-Null - $Matches.version + & $_.Split("/")[0] --version | Select-Object -First 1 | Take-OutputPart -Part 3 } | Sort-Object {[Version]$_} return "GNU C++ " + ($cppVersions -Join ", ") }