mirror of
https://github.com/actions/runner-images.git
synced 2025-12-29 05:17:11 +08:00
[Windows] Set user agent header to get mysql patch version (#8773)
This commit is contained in:
@@ -16,7 +16,7 @@ Install-Binary -Url $InstallerURI -Name $InstallerName -ArgumentList $ArgumentLi
|
||||
$MysqlVersionMajorMinor = $MysqlVersion.ToString(2)
|
||||
|
||||
if ($MysqlVersion.Build -lt 0) {
|
||||
$MysqlVersion = (Invoke-RestMethod -Uri "https://dev.mysql.com/downloads/mysql/${MysqlVersionMajorMinor}.html" -Headers @{'Accept'='text/html'} |
|
||||
$MysqlVersion = (Invoke-RestMethod -Uri "https://dev.mysql.com/downloads/mysql/${MysqlVersionMajorMinor}.html" -Headers @{ 'User-Agent'='curl/8.4.0' } |
|
||||
Select-String -Pattern "${MysqlVersionMajorMinor}\.\d+").Matches.Value
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user