aboutsummaryrefslogtreecommitdiff
path: root/scripts/fetchTool.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/fetchTool.ps1')
-rw-r--r--scripts/fetchTool.ps110
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