1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 16:09:03 -08:00

better error handling

This commit is contained in:
Connor Olding 2015-12-12 06:39:30 -08:00
parent 5ce9a3f562
commit ca62d43d88

View file

@ -31,7 +31,7 @@ mkgist() {
fi
# TODO: sanitize $desc
curl 'https://api.github.com/gists' -sid@- -H "$head" -o "$rf" << EOF
curl 'https://api.github.com/gists' -sSid@- -H "$head" -o "$rf" << EOF
{
"description": "$desc",
"public": $public,
@ -41,6 +41,7 @@ EOF
if [ $? -ne 0 ]; then
rm "$rf"
echo failed to POST to github >&2
return 1
fi