From 9c827793e026d774f49bc6371099577e7820ac23 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Tue, 6 Jun 2023 20:40:43 +1000 Subject: [PATCH] correct return code processing --- parse-list.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parse-list.sh b/parse-list.sh index e1d6891..a3635ec 100755 --- a/parse-list.sh +++ b/parse-list.sh @@ -117,8 +117,8 @@ do if [[ $NOISY || $REVIEW ]] ; then echo "$2 $param $EXTRAPARAMS" ; fi if [[ -z $REVIEW ]] ; then if [[ $param ]] ; then - RESPONSE=$($2 $param $EXTRAPARAMS) - if [ $? -eq 0 ] ; then echo "($?) $RESPONSE" ; fi + RESPONSE=$($2 $param $EXTRAPARAMS) ; rc=$? + if [ $rc -ne 0 ] ; then echo "$RESPONSE" ; fi if [ $DEBUG ] ; then echo "RESPONSE=$RESPONSE" ; fi fi fi