From 4ee7f0113e9cc480090bf5e1685d4748277e7290 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Jul 2022 23:41:48 +0200 Subject: [PATCH] fix(cli): show straight logs after straight error Instead of displaying an unhelpful backtrace about failed git commands, show the tail of the *straight-process* buffer. --- lisp/doom-cli-lib.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/doom-cli-lib.el b/lisp/doom-cli-lib.el index 20aae8307..5637914c1 100644 --- a/lisp/doom-cli-lib.el +++ b/lisp/doom-cli-lib.el @@ -905,7 +905,9 @@ considered as well." (context (or context (doom-cli-context-create))) (straight-error (and (bound-and-true-p straight-process-buffer) - (member straight-process-buffer data) + (or (member straight-process-buffer data) + (string-match-p (regexp-quote straight-process-buffer) + (error-message-string data))) (with-current-buffer (straight--process-buffer) (split-string (buffer-string) "\n" t)))) (error-file (doom-cli--output-file 'error context)))