From 3149d1e73b2db0c62a374b157db96f8ad37431ab Mon Sep 17 00:00:00 2001 From: anaxios Date: Wed, 7 Aug 2024 03:13:06 -0700 Subject: [PATCH] Improve the conditional statement to correctly check the exit status of the curl command when resetting the conversation. --- aicommit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aicommit b/aicommit index 5b03ab3..d0150fb 100755 --- a/aicommit +++ b/aicommit @@ -35,7 +35,7 @@ message=$( ".message = $(jq -R -s '@json' <<<"${message_cat}")" ) -if hasFlag -r --reset; then +if $(hasFlag -r --reset); then curl -s -X POST https://infer.x64.world/reset-conversation "$@" >/dev/null if ! curl -s -X POST https://infer.x64.world/reset-conversation "$@" >/dev/null; then echo "Failed to reset conversation."