Improve the conditional statement to correctly check the exit status of the curl command when resetting the conversation.

This commit is contained in:
ilguappo 2024-08-07 03:13:06 -07:00
parent 31ae31643b
commit 3149d1e73b

View File

@ -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."