This repository was archived by the owner on Apr 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -203,10 +203,9 @@ function GetHTTPResponse([Uri] $Uri)
203203 # Default timeout for HttpClient is 100s. For a 50 MB download this assumes 500 KB/s average, any less will time out
204204 # 10 minutes allows it to work over much slower connections.
205205 $HttpClient.Timeout = New-TimeSpan - Minutes 10
206- $ActualUri = if (($Uri -like " $AzureFeed *" ) -or ($Uri -like " $UncachedFeed *" )) { " ${Uri}${FeedCredential} " } else { $Uri }
207- $Response = $HttpClient.GetAsync ($ActualUri ).Result
206+ $Response = $HttpClient.GetAsync (" ${Uri}${FeedCredential} " ).Result
208207 if (($Response -eq $null ) -or (-not ($Response.IsSuccessStatusCode ))) {
209- # The feed credential is potential sensitive info. Do not log ActualUri to console output.
208+ # The feed credential is potentially sensitive info. Do not log FeedCredential to console output.
210209 $ErrorMsg = " Failed to download $Uri ."
211210 if ($Response -ne $null ) {
212211 $ErrorMsg += " $Response "
Original file line number Diff line number Diff line change @@ -619,9 +619,7 @@ downloadcurl() {
619619 local out_path=" ${2:- } "
620620
621621 # Append feed_credential as late as possible before calling curl to avoid logging feed_credential
622- if [[ " $remote_path " == " $azure_feed " * ]] || [[ " $remote_path " == " $uncached_feed " * ]]; then
623- remote_path=" ${remote_path}${feed_credential} "
624- fi
622+ remote_path=" ${remote_path}${feed_credential} "
625623
626624 local failed=false
627625 if [ -z " $out_path " ]; then
@@ -642,9 +640,7 @@ downloadwget() {
642640 local out_path=" ${2:- } "
643641
644642 # Append feed_credential as late as possible before calling wget to avoid logging feed_credential
645- if [[ " $remote_path " == " $azure_feed " * ]] || [[ " $remote_path " == " $uncached_feed " * ]]; then
646- remote_path=" ${remote_path}${feed_credential} "
647- fi
643+ remote_path=" ${remote_path}${feed_credential} "
648644
649645 local failed=false
650646 if [ -z " $out_path " ]; then
You can’t perform that action at this time.
0 commit comments