correct return code processing

This commit is contained in:
Trevor Batley 2023-06-06 20:40:43 +10:00
parent 5207676ada
commit 9c827793e0

View File

@ -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