From 83ce339558e04718e138cf285a0d38ae119743c3 Mon Sep 17 00:00:00 2001 From: Keith Dahlby Date: Mon, 30 Jan 2017 19:49:29 -0600 Subject: [PATCH] Fail if the version tag doesn't exist --- chocolatey/packAndLocalInstall.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chocolatey/packAndLocalInstall.ps1 b/chocolatey/packAndLocalInstall.ps1 index 90ee8262f..b7b0674a5 100644 --- a/chocolatey/packAndLocalInstall.ps1 +++ b/chocolatey/packAndLocalInstall.ps1 @@ -3,6 +3,9 @@ pushd $PSScriptRoot $nuspec = [xml](Get-Content poshgit.nuspec) $version = $nuspec.package.metadata.version +$ErrorActionPreference = 'Stop' +git rev-parse $version 2>$null + choco pack poshgit.nuspec choco install -f -y poshgit -pre --version=$version -s .