aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-10-17 13:19:14 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-10-17 13:22:17 -0700
commitedb718e21b56ab62a6544a26c1bba450d952b32d (patch)
treeb27039ac11353e840c49cfd029729dc95ccd0694 /scripts
parent87296823ac9cc939c233caf7c02585b5fe6d3df7 (diff)
downloadvcpkg-edb718e21b56ab62a6544a26c1bba450d952b32d.tar.gz
vcpkg-edb718e21b56ab62a6544a26c1bba450d952b32d.zip
[fetchDependency] Introduce Test-Command function
Diffstat (limited to 'scripts')
-rw-r--r--scripts/fetchDependency.ps15
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1
index b43fd0cb5..ac4ab5f46 100644
--- a/scripts/fetchDependency.ps1
+++ b/scripts/fetchDependency.ps1
@@ -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,