From 85dc61ee14049c85ab342747b0c2669e5ba3f55f Mon Sep 17 00:00:00 2001
From: Zubin Duggal <zubin.duggal@gmail.com>
Date: Tue, 18 Jan 2022 18:55:40 +0530
Subject: [PATCH] ci: Fix subtlety with  not taking effect because of time_it
 (#20898)

---
 .gitlab/ci.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 776eff3a4a5d..c30f5ec846bb 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -25,7 +25,10 @@ function time_it() {
   shift
   local start=$(date +%s)
   local res=0
-  $@ || res=$?
+  set +e
+  ( set -e ; $@ )
+  res=$?
+  set -e
   local end=$(date +%s)
   local delta=$(expr $end - $start)
 
-- 
GitLab