From bdba4757ec2d3de4a985956575479fbee80ef6af Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Wed, 13 Jan 2010 17:34:57 +0100
Subject: [PATCH] =?UTF-8?q?check-python-code:=20Use=20=E2=80=9Cset=20-e?=
 =?UTF-8?q?=E2=80=9D=20to=20abort=20on=20errors?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 autotools/check-python-code | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/autotools/check-python-code b/autotools/check-python-code
index dcacbf132..4f14ccb0c 100755
--- a/autotools/check-python-code
+++ b/autotools/check-python-code
@@ -18,7 +18,11 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301, USA.
 
-let problems=0
+set -e
+
+# "[...] If the last ARG evaluates to 0, let returns 1; 0 is returned
+# otherwise.", hence ignoring the return value.
+let problems=0 || :
 
 for script; do
   if grep -n -H -F $'\t' "$script"; then
-- 
GitLab