[Ubuntu] fix PHP software report (#7131)

This commit is contained in:
Mikhail Koliada
2023-02-17 16:37:46 +01:00
committed by GitHub
parent bf50e0da6f
commit c1a9cb6de6

View File

@@ -220,7 +220,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+:)?(?<version>\d+\.\d+\.\d+)-" | Out-Null
$_ -match "now (\d+:)?(?<version>\d+\.\d+\.\d+)" | Out-Null
$Matches.version
}
}