From a5691285ecb54a263e4d3baa54400cff049c8a89 Mon Sep 17 00:00:00 2001 From: Nicolas Arnaud-Cormos Date: Thu, 28 Aug 2014 13:34:59 +0200 Subject: [PATCH] Ensure-Exists is necessary for build.ps1, add it back. --- scripts/utils.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index 2835ac9af..714c983d6 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -1,3 +1,11 @@ +function Ensure-Exists ($path) { + if (-not (Test-Path $path)) { + Write-Error "Missing required $path! Ensure it is installed" + exit 1 + } + return $true > $null +} + function Ensure-Executable ($command) { try { Get-Command $command -ErrorAction Stop > $null } catch { @@ -47,4 +55,4 @@ function Flatten-Directory ($name) { function Digest-MD5 ($path) { return Invoke-Expression "md5sum $path" -} \ No newline at end of file +}