From 87d9090b7adff1eccba61b66990d1ea93ae91cae Mon Sep 17 00:00:00 2001 From: Karthik Chikmagalur Date: Sat, 18 Mar 2023 00:51:49 -0700 Subject: [PATCH] gptel-curl: Fix process sentinel * gptel-curl.el (gptel-curl--sentinel): Use `process-status' instead of trying to match on the string passed to he process sentinel as the status. --- gptel-curl.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gptel-curl.el b/gptel-curl.el index 38a3bf8..43a4b5c 100644 --- a/gptel-curl.el +++ b/gptel-curl.el @@ -93,7 +93,7 @@ PROCESS and STATUS are process parameters." (when gptel--debug (with-current-buffer proc-buf (clone-buffer "*gptel-error*" 'show))) - (if-let* (((equal status "finished\n")) + (if-let* (((eq (process-status process) 'exit)) (proc-info (alist-get process gptel-curl--process-alist)) (proc-token (plist-get proc-info :token)) (response (gptel-curl--parse-response proc-buf proc-token)))