[fetchDependency] Introduce Test-Command function

This commit is contained in:
Alexander Karatarakis 2017-10-17 13:19:14 -07:00
parent 87296823ac
commit edb718e21b

View File

@ -14,6 +14,11 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root
$downloadsDir = "$vcpkgRootDir\downloads"
function Test-Command($commandName)
{
return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue)
}
function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
{
function performDownload( [Parameter(Mandatory=$true)][string]$Dependency,