Fix dotnet-install script when latest version file for channel is returned as application/octet-stream
This commit is contained in:
parent
1fa454bda4
commit
83f9a374d3
1 changed files with 1 additions and 1 deletions
2
scripts/obtain/dotnet-install.ps1
vendored
2
scripts/obtain/dotnet-install.ps1
vendored
|
@ -232,7 +232,7 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co
|
|||
$StringContent = $Response.Content.ReadAsStringAsync().Result
|
||||
|
||||
switch ($Response.Content.Headers.ContentType) {
|
||||
{ ($_ -eq "application/octet-stream") } { $VersionText = [Text.Encoding]::UTF8.GetString($StringContent) }
|
||||
{ ($_ -eq "application/octet-stream") } { $VersionText = $StringContent }
|
||||
{ ($_ -eq "text/plain") } { $VersionText = $StringContent }
|
||||
{ ($_ -eq "text/plain; charset=UTF-8") } { $VersionText = $StringContent }
|
||||
default { throw "``$Response.Content.Headers.ContentType`` is an unknown .version file content type." }
|
||||
|
|
Loading…
Reference in a new issue