[ubuntu] Change PyPy pattern (#2767)

This commit is contained in:
Mikhail Timofeev
2021-02-20 14:24:39 +03:00
committed by GitHub
parent d0e2b96b20
commit b42272d743

View File

@@ -13,7 +13,7 @@ function Get-ToolcachePyPyVersions {
Get-ChildItem -Path $toolcachePath -Name | Sort-Object { [Version] $_ } | ForEach-Object { Get-ChildItem -Path $toolcachePath -Name | Sort-Object { [Version] $_ } | ForEach-Object {
$pypyRootPath = Join-Path $toolcachePath $_ "x64" $pypyRootPath = Join-Path $toolcachePath $_ "x64"
[string]$pypyVersionOutput = & "$pypyRootPath/bin/python" -c "import sys;print(sys.version)" [string]$pypyVersionOutput = & "$pypyRootPath/bin/python" -c "import sys;print(sys.version)"
$pypyVersionOutput -match "^([\d\.]+) \(.+\) \[PyPy ([\d\.]+) .+]$" | Out-Null $pypyVersionOutput -match "^([\d\.]+) \(.+\) \[PyPy ([\d\.]+\S*) .+]$" | Out-Null
return "{0} [PyPy {1}]" -f $Matches[1], $Matches[2] return "{0} [PyPy {1}]" -f $Matches[1], $Matches[2]
} }
} }