mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
[Ubuntu] Fix composer version (#5335)
This commit is contained in:
committed by
GitHub
parent
062b07565e
commit
710d5de922
@@ -236,13 +236,7 @@ function Get-PHPVersions {
|
||||
}
|
||||
|
||||
function Get-ComposerVersion {
|
||||
$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
|
||||
}
|
||||
$composerVersion = (composer --version) -replace " version" | Take-OutputPart -Part 1
|
||||
return $composerVersion
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user