aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2018-01-17 17:31:22 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2018-01-17 17:34:40 -0800
commit3390007020921b41e3d4d42ad9b46c671250743a (patch)
tree4037fbd1e95e9af32385c3e023a9f1ba58286858 /scripts
parent8e773df065096fe81e3d888b6b844cbecfbc18e6 (diff)
downloadvcpkg-3390007020921b41e3d4d42ad9b46c671250743a.tar.gz
vcpkg-3390007020921b41e3d4d42ad9b46c671250743a.zip
[powershell] Remove usages of BitsTransfer
Diffstat (limited to 'scripts')
-rw-r--r--scripts/VcpkgPowershellUtils.ps127
1 files changed, 0 insertions, 27 deletions
diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1
index e394e540e..997f603e3 100644
--- a/scripts/VcpkgPowershellUtils.ps1
+++ b/scripts/VcpkgPowershellUtils.ps1
@@ -94,11 +94,6 @@ function vcpkgCheckEqualFileHash( [Parameter(Mandatory=$true)][string]$filePat
}
}
-if (vcpkgHasModule -moduleName 'BitsTransfer')
-{
- Import-Module BitsTransfer -Verbose:$false
-}
-
function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url,
[Parameter(Mandatory=$true)][string]$downloadPath)
{
@@ -119,28 +114,6 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url,
$wc.Proxy.Credentials = vcpkgGetCredentials
}
- # Some download (e.g. git from github)fail with Start-BitsTransfer
- if (vcpkgHasCommand -commandName 'Start-BitsTransfer')
- {
- try
- {
- if ($proxyAuth)
- {
- $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic")
- $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential", $wc.Proxy.Credentials)
- }
- Start-BitsTransfer -Source $url -Destination $downloadPartPath -ErrorAction Stop
- Move-Item -Path $downloadPartPath -Destination $downloadPath
- return
- }
- catch [System.Exception]
- {
- # If BITS fails for any reason, delete any potentially partially downloaded files and continue
- vcpkgRemoveItem $downloadPartPath
- }
- }
-
- Write-Verbose("Downloading $Dependency...")
$wc.DownloadFile($url, $downloadPartPath)
Move-Item -Path $downloadPartPath -Destination $downloadPath
}