[Ubuntu] Tight composer version to 2.2.9 for Ubuntu Server 18 (#5321)

* [Ubuntu] Tight composer verstion to 2.2.9 for Ubuntu Server 18

* Remove extra line

* remove double quotes
This commit is contained in:
Aleksandr Chebotov
2022-04-01 10:18:38 +02:00
committed by GitHub
parent a5d2e20fbc
commit f052b4c10f
3 changed files with 18 additions and 3 deletions

View File

@@ -236,8 +236,14 @@ function Get-PHPVersions {
}
function Get-ComposerVersion {
$(composer --version) -match "Composer version (?<version>\d+\.\d+\.\d+)\s" | Out-Null
return $Matches.version
$rawVersion = composer --version
if (Test-IsUbuntu18) {
$rawVersion -match "Composer version (?<version>\d+\.\d+\.\d+)\s" | Out-Null
$composerVersion = $Matches.version
} else {
$composerVersion = $rawVersion | Take-OutputPart -Part 1
}
return $composerVersion
}
function Get-PHPUnitVersion {