aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-03-19 17:59:21 +0800
committertypebrook <typebrook@gmail.com>2020-03-20 20:05:45 +0800
commitbd1224b96536121cba62097b0a19febe46ae14df (patch)
treeb2db7106b656a985aa9c8146fe4f7575cf04281b
parentf1ad5ae584ec7458f56927b0aaba5cf8c833cf64 (diff)
Fix logic error with invalid index
-rwxr-xr-xgist4
1 files changed, 2 insertions, 2 deletions
diff --git a/gist b/gist
index 5f64513..e2c6f79 100755
--- a/gist
+++ b/gist
@@ -525,8 +525,8 @@ _import_to_github() {
525# Simply commit current changes and push to remote 525# Simply commit current changes and push to remote
526_push_to_remote() { 526_push_to_remote() {
527 if [[ ! $(pwd) =~ ^$folder/[0-9a-z]+$ ]]; then 527 if [[ ! $(pwd) =~ ^$folder/[0-9a-z]+$ ]]; then
528 _gist_id "$1" 528 _gist_id "$1" || return 1
529 cd "$folder/$GIST_ID" || return 1 529 cd "$folder/$GIST_ID"
530 fi 530 fi
531 if [[ -n $(git status --short) ]]; then 531 if [[ -n $(git status --short) ]]; then
532 git add . && git commit -m 'update' 532 git add . && git commit -m 'update'