mirror of
https://github.com/actions/runner-images.git
synced 2025-12-24 02:20:20 +08:00
[win] specify accept header when downloading mysql meta (#8009)
as reported in https://github.com/actions/runner-images/issues/8004 dev.mysql.com behaviour has changed, it requires "Accept: text/html" for download page Co-authored-by: Miguel Nieto <m.nieto@kevull.com>
This commit is contained in:
@@ -15,7 +15,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" |
|
||||
$MysqlVersion = (Invoke-RestMethod -Uri "https://dev.mysql.com/downloads/mysql/${MysqlVersionMajorMinor}.html" -Headers @{'Accept'='text/html'} |
|
||||
Select-String -Pattern "${MysqlVersionMajorMinor}\.\d+").Matches.Value
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user