From a4a3599753f795486ff657059601f02d22bc8676 Mon Sep 17 00:00:00 2001 From: "Julian C. Dunn" Date: Thu, 5 Dec 2013 01:02:15 -0500 Subject: [PATCH] Make Thor actually exit non-zero when a validation error occurs. --- Thorfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Thorfile b/Thorfile index c823f1b68..e4e35efde 100644 --- a/Thorfile +++ b/Thorfile @@ -13,7 +13,9 @@ class Packer < Thor templates = Dir.glob("*.json") templates.each do |template| puts "#{template}" - system "packer validate #{template}" + unless system "packer validate #{template}" + fail "Validation failed!" + end puts "\n" end end