aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/fetchDependency.ps18
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1
index 6a40c9758..7c5c2a989 100644
--- a/scripts/fetchDependency.ps1
+++ b/scripts/fetchDependency.ps1
@@ -81,6 +81,14 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
if ($Dependency -ne "git") # git fails with BITS
{
try {
+ $WC = New-Object System.Net.WebClient
+ $ProxyAuth = !$WC.Proxy.IsBypassed($url)
+ If($ProxyAuth){
+ $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication"
+ $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic")
+ $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred)
+ }
+
Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop
}
catch [System.Exception] {