From 6c378afeaaed37ed305b9a18d6b0486f92baa6c5 Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 3 Feb 2020 08:11:33 +0800 Subject: foo --- scripts/gist | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gist b/scripts/gist index 5874bc5..86676f4 100755 --- a/scripts/gist +++ b/scripts/gist @@ -418,11 +418,11 @@ _create_gist() { | echo "{ \"public\": $public, \"files\": $(cat -), \"description\": \"$description\"}" \ | http_method POST $GITHUB_API/gists \ | sed '1 s/^/[/; $ s/$/]/' \ - | _parse_response $index >> $INDEX + | _parse_response $index - if [[ $? -eq 0 ]]; then + if [[ -n "$result" ]]; then echo 'Gist is created' - _show_list | tail -1 + echo $result >> $INDEX && _show_list | tail -1 else echo 'Failed to create gist' fi -- cgit v1.2.3-70-g09d2