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.
This commit is contained in:
Henrik Lissner 2022-07-31 23:41:48 +02:00
parent 61d7200e64
commit 4ee7f0113e
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -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)))