diff options
| author | Wimok Nupphiboon <wimok.mok@gmail.com> | 2018-03-24 11:53:55 +0700 |
|---|---|---|
| committer | Wimok Nupphiboon <wimok.mok@gmail.com> | 2018-03-24 11:53:55 +0700 |
| commit | 663be4bbffd435cf5e5fc62a0774c784c10ddc68 (patch) | |
| tree | d214f24405fa75d4dad9dfb938a04846d2ca6102 /scripts/fetchTool.ps1 | |
| parent | 1e380dde21317e73d1859dad1c64c06eb88cc502 (diff) | |
| parent | aa57df6d6ed6d17000522492b66fc93d3f32ab86 (diff) | |
| download | vcpkg-663be4bbffd435cf5e5fc62a0774c784c10ddc68.tar.gz vcpkg-663be4bbffd435cf5e5fc62a0774c784c10ddc68.zip | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'scripts/fetchTool.ps1')
| -rw-r--r-- | scripts/fetchTool.ps1 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 2c2f599ef..ff9b5d9bf 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -25,7 +25,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) throw "Unkown tool $tool" } - $exePath = "$downloadsDir\$($toolData.exeRelativePath)" + $exePath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])" if (Test-Path $exePath) { @@ -35,14 +35,14 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" if ($isArchive) { - $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)" + $downloadPath = "$downloadsDir\$(@($toolData.archiveRelativePath)[0])" } else { - $downloadPath = "$downloadsDir\$($toolData.exeRelativePath)" + $downloadPath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])" } - $url = $toolData.url + [String]$url = @($toolData.url)[0] if (!(Test-Path $downloadPath)) { Write-Host "Downloading $tool..." @@ -50,7 +50,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) Write-Host "Downloading $tool has completed successfully." } - $expectedDownloadedFileHash = $toolData.sha256 + $expectedDownloadedFileHash = @($toolData.sha256)[0] $downloadedFileHash = vcpkgGetSHA256 $downloadPath vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash |
