diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1 index 34e7fa53a..1b8e575e0 100644 --- a/scripts/obtain/dotnet-install.ps1 +++ b/scripts/obtain/dotnet-install.ps1 @@ -264,7 +264,7 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel, } } -function Get-Download-Link([string]$AzureFeed, [string]$Channel, [string]$SpecificVersion, [string]$CLIArchitecture) { +function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) { Say-Invocation $MyInvocation if ($SharedRuntime) { @@ -279,7 +279,7 @@ function Get-Download-Link([string]$AzureFeed, [string]$Channel, [string]$Specif return $PayloadURL } -function Get-LegacyDownload-Link([string]$AzureFeed, [string]$Channel, [string]$SpecificVersion, [string]$CLIArchitecture) { +function Get-LegacyDownload-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) { Say-Invocation $MyInvocation if ($SharedRuntime) { @@ -449,14 +449,14 @@ function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolde $CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture $SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version -$DownloadLink = Get-Download-Link -AzureFeed $AzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture -$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture +$DownloadLink = Get-Download-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture +$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture if ($DryRun) { Say "Payload URLs:" Say "Primary - $DownloadLink" Say "Legacy - $LegacyDownloadLink" - Say "Repeatable invocation: .\$($MyInvocation.MyCommand) -Version $SpecificVersion -Channel $Channel -Architecture $CLIArchitecture -InstallDir $InstallDir" + Say "Repeatable invocation: .\$($MyInvocation.Line)" exit 0 } @@ -480,7 +480,7 @@ if ($free.Freespace / 1MB -le 100 ) { exit 0 } -$ZipPath = [System.IO.Path]::GetTempFileName() +$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()) Say-Verbose "Zip path: $ZipPath" Say "Downloading link: $DownloadLink" try { @@ -489,7 +489,7 @@ try { catch { Say "Cannot download: $DownloadLink" $DownloadLink = $LegacyDownloadLink - $ZipPath = [System.IO.Path]::GetTempFileName() + $ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()) Say-Verbose "Legacy zip path: $ZipPath" Say "Downloading legacy link: $DownloadLink" DownloadFile -Uri $DownloadLink -OutPath $ZipPath diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index c27dd0f7d..77b7781c2 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -334,6 +334,7 @@ is_dotnet_package_installed() { # azure_feed - $1 # channel - $2 # normalized_architecture - $3 +# coherent - $4 get_latest_version_info() { eval $invocation @@ -601,7 +602,7 @@ downloadwget() { local failed=false if [ -z "$out_path" ]; then - wget -q --tries 10 $remote_path || failed=true + wget -q --tries 10 -O - $remote_path || failed=true else wget -v --tries 10 -O $out_path $remote_path || failed=true fi