diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 6a17b9c8d..7dd80a97d 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -236,13 +236,7 @@ function Get-PHPVersions { } function Get-ComposerVersion { - $rawVersion = composer --version - if (Test-IsUbuntu18) { - $rawVersion -match "Composer version (?\d+\.\d+\.\d+)\s" | Out-Null - $composerVersion = $Matches.version - } else { - $composerVersion = $rawVersion | Take-OutputPart -Part 1 - } + $composerVersion = (composer --version) -replace " version" | Take-OutputPart -Part 1 return $composerVersion }