[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 <[email protected]>
This commit is contained in:
co-authored by
Miguel Nieto
parent
2a1b5d19a3
commit
e1d1163c15
@@ -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