From 710d5de922d30d49f416b679f3f2ff1a95f54613 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Mon, 4 Apr 2022 11:26:27 +0200 Subject: [PATCH] [Ubuntu] Fix composer version (#5335) --- .../scripts/SoftwareReport/SoftwareReport.Common.psm1 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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 }