From 0fec5d815224c1175b232db5beac4640b0270b94 Mon Sep 17 00:00:00 2001 From: Dusko Dobranic <101048884+ddobranic@users.noreply.github.com> Date: Tue, 31 May 2022 20:35:28 +0200 Subject: [PATCH] Fix PHP8.0.x version in software report (#5653) * Fix PHP8.0.x version in software report * Remove hardcoded value for epoch * Using updated regex to match epoch version --- images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 5941b309..bb5bda56 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -236,7 +236,7 @@ function Get-SbtVersion { function Get-PHPVersions { $result = Get-CommandResult "apt list --installed" -Multiline return $result.Output | Where-Object { $_ -match "^php\d+\.\d+/"} | ForEach-Object { - $_ -match "now (?\d+\.\d+\.\d+)-" | Out-Null + $_ -match "now (\d+:)?(?\d+\.\d+\.\d+)-" | Out-Null $Matches.version } }