diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-05-24 03:33:20 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-05-24 03:33:20 -0700 |
| commit | 2b944c21e84a38af5628c849141fe959eb1c65e1 (patch) | |
| tree | 50df0d323e265369b7563c07f60d31b355289a15 /scripts | |
| parent | e9b561fa4809a027089da0a726ebcd80a0043294 (diff) | |
| download | vcpkg-2b944c21e84a38af5628c849141fe959eb1c65e1.tar.gz vcpkg-2b944c21e84a38af5628c849141fe959eb1c65e1.zip | |
[vcpkg] Fix regression on Windows 7/8 introduced with Powershell Core support
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/fetchDependency.ps1 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6c2e85b60..b6144d581 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -9,7 +9,7 @@ $downloadPromptOverride_NO_OVERRIDE= 0 $downloadPromptOverride_DO_NOT_PROMPT = 1 $downloadPromptOverride_ALWAYS_PROMPT = 2 -if ($PSVersionTable.PSEdition -eq "Desktop") { +if ($PSVersionTable.PSEdition -ne "Core") { Import-Module BitsTransfer -Verbose:$false } @@ -82,7 +82,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) New-Item -ItemType directory -Path $downloadDir | Out-Null } - if (($PSVersionTable.PSEdition -eq "Desktop") -and ($Dependency -ne "git")) # git fails with BITS + if (($PSVersionTable.PSEdition -ne "Core") -and ($Dependency -ne "git")) # git fails with BITS { try { $WC = New-Object System.Net.WebClient @@ -197,7 +197,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion #calculating the hash - if ($PSVersionTable.PSEdition -eq "Desktop") + if ($PSVersionTable.PSEdition -ne "Core") { $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") $fileAsByteArray = [io.File]::ReadAllBytes($downloadPath) |
