fix http_code return from curl

This commit is contained in:
Trevor Batley 2023-06-02 17:31:17 +10:00
parent 3c94831315
commit 4e00e4676b

View File

@ -249,7 +249,7 @@ if [ "$RESPONSE" == "200" ]; then
fi fi
# Now delete the repo, re-create it and clone it in to local # Now delete the repo, re-create it and clone it in to local
if [ $DEBUG ] ; then echo "Delete $ORGGITEA/$1" ; fi if [ $DEBUG ] ; then echo "Delete $ORGGITEA/$1" ; fi
RESPONSE=$(curl "$checkSSL" "$curlsilent" -o /dev/null -w "{%http_code}" -X 'DELETE' \ RESPONSE=$(curl "$checkSSL" "$curlsilent" -o /dev/null -w "%{http_code}" -X 'DELETE' \
"$GITEAHOST/api/v1/repos/$ORGGITEA/$1" \ "$GITEAHOST/api/v1/repos/$ORGGITEA/$1" \
-H 'accept: application/json' \ -H 'accept: application/json' \
-H "Authorization: token $GITEAACCESSTOKEN") -H "Authorization: token $GITEAACCESSTOKEN")