|
45 | 45 | .PARAMETER Proxy |
46 | 46 | Specifies proxy to use during the installation. |
47 | 47 | .PARAMETER ProxyCredential |
48 | | - Specifies credential for the given prxoy. |
| 48 | + Specifies credential for the given proxy. |
49 | 49 | .PARAMETER ProxyUseDefaultCredentials |
50 | 50 | Use the credentials of the current user for the proxy server that is specified by the -Proxy parameter. |
51 | 51 | .PARAMETER RunAsAdmin |
@@ -498,15 +498,21 @@ function Install-Scoop { |
498 | 498 | # Enable TLS 1.2 |
499 | 499 | Optimize-SecurityProtocol |
500 | 500 |
|
| 501 | + # Download scoop from GitHub |
| 502 | + Write-InstallInfo "Downloading ..." |
| 503 | + $downloader = Get-Downloader |
| 504 | + |
501 | 505 | if (Test-Command-Available('git')) { |
| 506 | + if ($downloader.Proxy) { |
| 507 | + #define env vars for git when behind a proxy |
| 508 | + $Env:HTTP_PROXY = $downloader.Proxy.Address |
| 509 | + $Env:HTTPS_PROXY = $downloader.Proxy.Address |
| 510 | + } |
502 | 511 | Write-Verbose "Cloning $SCOOP_PACKAGE_GIT_REPO to $SCOOP_APP_DIR" |
503 | 512 | git clone $SCOOP_PACKAGE_GIT_REPO $SCOOP_APP_DIR |
504 | 513 | Write-Verbose "Cloning $SCOOP_MAIN_BUCKET_GIT_REPO to $SCOOP_MAIN_BUCKET_DIR" |
505 | 514 | git clone $SCOOP_MAIN_BUCKET_GIT_REPO $SCOOP_MAIN_BUCKET_DIR |
506 | 515 | } else { |
507 | | - # Download scoop zip from GitHub |
508 | | - Write-InstallInfo "Downloading..." |
509 | | - $downloader = Get-Downloader |
510 | 516 | # 1. download scoop |
511 | 517 | $scoopZipfile = "$SCOOP_APP_DIR\scoop.zip" |
512 | 518 | if (!(Test-Path $SCOOP_APP_DIR)) { |
|
0 commit comments