From 8a78ad7d064ebfce848ea4acd3de68afa8246d9e Mon Sep 17 00:00:00 2001 From: rawley fowler Date: Wed, 7 Sep 2022 19:03:28 -0600 Subject: [PATCH] add 8 error code sqlite for script --- insert-posts.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/insert-posts.sh b/insert-posts.sh index 7ace3cc..1855b54 100755 --- a/insert-posts.sh +++ b/insert-posts.sh @@ -46,6 +46,7 @@ function insert_post() { local status="$?" [ "$status" = "0" ] && echo "Inserted $slug successfully." && return + [ "$status" = "8" ] && echo "The database is read restricted, did you run the program as the correct user?" && exit 1 [ "$status" = "19" ] && echo "Post $slug already exists." && update_post "$date" "$slug" "$title" "$content" }