From a3d26040de1dcf07d47fbc4d4c63d3a319276d9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= <frederic.leroy@b-com.com>
Date: Fri, 24 Jun 2016 05:35:32 -0500
Subject: [PATCH] build_helper: add EXIT handler to inform that the build fails

---
 cmake_targets/tools/build_helper | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper
index 9971c56d86..c3e1ebfb47 100755
--- a/cmake_targets/tools/build_helper
+++ b/cmake_targets/tools/build_helper
@@ -95,6 +95,18 @@ check_supported_distribution() {
     return 1
 }
 
+##################
+# Error handlers #
+##################
+
+handler_EXIT() {
+	local exit_code=$?
+    [ "$exit_code" -eq 0 ] || echo_error "build have failed"
+	exit $exit_code
+}
+
+trap handler_EXIT EXIT
+
 ###########################
 # Cleaners
 ###########################
-- 
GitLab