show return code on non-zero exit

This commit is contained in:
Trevor Batley 2023-06-15 10:19:59 +10:00
parent 3f8e6f31ae
commit 999c22b420

View File

@ -118,7 +118,7 @@ do
if [[ -z $REVIEW ]] ; then
if [[ $param ]] ; then
RESPONSE=$($2 $param $EXTRAPARAMS) ; rc=$?
if [ $rc -ne 0 ] ; then echo "$RESPONSE" ; fi
if [ $rc -ne 0 ] ; then echo "($rc)\n$RESPONSE" ; fi
if [ $DEBUG ] ; then echo "RESPONSE=$RESPONSE" ; fi
fi
fi