Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #7439 from dsplaisted/fix-obtain-master
Browse files Browse the repository at this point in the history
Fix dotnet-install.ps1 script when latest version file for channel is returned as application/octet-stream
  • Loading branch information
dsplaisted authored Aug 15, 2017
2 parents 22a87d3 + 83f9a37 commit 6ed4e12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/obtain/dotnet-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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." }
Expand Down

0 comments on commit 6ed4e12

Please sign in to comment.