diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1 index af50dbd6e..e267edc76 100644 --- a/scripts/obtain/dotnet-install.ps1 +++ b/scripts/obtain/dotnet-install.ps1 @@ -203,10 +203,9 @@ function GetHTTPResponse([Uri] $Uri) # Default timeout for HttpClient is 100s. For a 50 MB download this assumes 500 KB/s average, any less will time out # 10 minutes allows it to work over much slower connections. $HttpClient.Timeout = New-TimeSpan -Minutes 10 - $ActualUri = if (($Uri -like "$AzureFeed*") -or ($Uri -like "$UncachedFeed*")) { "${Uri}${FeedCredential}" } else { $Uri } - $Response = $HttpClient.GetAsync($ActualUri).Result + $Response = $HttpClient.GetAsync("${Uri}${FeedCredential}").Result if (($Response -eq $null) -or (-not ($Response.IsSuccessStatusCode))) { - # The feed credential is potential sensitive info. Do not log ActualUri to console output. + # The feed credential is potentially sensitive info. Do not log FeedCredential to console output. $ErrorMsg = "Failed to download $Uri." if ($Response -ne $null) { $ErrorMsg += " $Response" diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index ee4e6ba66..ee15af5a7 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -619,9 +619,7 @@ downloadcurl() { local out_path="${2:-}" # Append feed_credential as late as possible before calling curl to avoid logging feed_credential - if [[ "$remote_path" == "$azure_feed"* ]] || [[ "$remote_path" == "$uncached_feed"* ]]; then - remote_path="${remote_path}${feed_credential}" - fi + remote_path="${remote_path}${feed_credential}" local failed=false if [ -z "$out_path" ]; then @@ -642,9 +640,7 @@ downloadwget() { local out_path="${2:-}" # Append feed_credential as late as possible before calling wget to avoid logging feed_credential - if [[ "$remote_path" == "$azure_feed"* ]] || [[ "$remote_path" == "$uncached_feed"* ]]; then - remote_path="${remote_path}${feed_credential}" - fi + remote_path="${remote_path}${feed_credential}" local failed=false if [ -z "$out_path" ]; then