mirror of
https://github.com/notwa/rc
synced 2024-11-05 16:09:03 -08:00
better error handling
This commit is contained in:
parent
5ce9a3f562
commit
ca62d43d88
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue