From 8af79bdea402d3f2b3e581f9d7f028210d405dfc Mon Sep 17 00:00:00 2001 From: Tadej Novak <tadej.novak@cern.ch> Date: Mon, 3 Aug 2020 14:48:32 +0200 Subject: [PATCH] Return status code from ThinCAWrapper.sh --- Control/AthenaCommon/share/ThinCAWrapper.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Control/AthenaCommon/share/ThinCAWrapper.sh b/Control/AthenaCommon/share/ThinCAWrapper.sh index 83c1c43fd63..07ac06c0546 100755 --- a/Control/AthenaCommon/share/ThinCAWrapper.sh +++ b/Control/AthenaCommon/share/ThinCAWrapper.sh @@ -28,7 +28,7 @@ done #Check if we got a top-level script #Improve: Check if there is exactly one! -if [ -z ${topscriptfile} ] +if [ -z "$topscriptfile" ] then echo "ERROR: No top-level python script given" exit 1 @@ -60,7 +60,7 @@ do done -if [[ -z $topscript ]]; +if [ -z "$topscript" ]; then echo "Could not find python script $topscriptfile" exit 1 @@ -68,6 +68,7 @@ fi #Finally: Execute it! python $topscript $scriptargs - - - +status=$? +if [ ! $status -eq 0 ]; then + exit $status +fi -- GitLab