From b72e6fba3ef069eafbd1f0191ab15a941dc195a3 Mon Sep 17 00:00:00 2001 From: James Allen Date: Wed, 28 May 2014 12:42:49 +0100 Subject: [PATCH] Report failed fpm command --- Gruntfile.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index d5c96773fd..e983c3ee69 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -361,7 +361,11 @@ module.exports = (grunt) -> ) console.log "fpm " + command.join(" ") proc = spawn "fpm", command, stdio: "inherit" - proc.on "close", callback + proc.on "close", (code) -> + if code != 0 + callback(new Error("exit code: #{code}")) + else + callback()