mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Include straight error in doom.error.log
This commit is contained in:
@ -255,11 +255,12 @@ BODY will be run when this dispatcher is called."
|
|||||||
(cl-incf num-nonmacro-input-events)
|
(cl-incf num-nonmacro-input-events)
|
||||||
(cl-destructuring-bind (backtrace &optional type data . _)
|
(cl-destructuring-bind (backtrace &optional type data . _)
|
||||||
(cons (doom-cli--backtrace) data)
|
(cons (doom-cli--backtrace) data)
|
||||||
(cond
|
(let ((straight-error-p
|
||||||
((and (bound-and-true-p straight-process-buffer)
|
(and (bound-and-true-p straight-process-buffer)
|
||||||
(stringp data)
|
|
||||||
(string-match-p (regexp-quote straight-process-buffer)
|
(string-match-p (regexp-quote straight-process-buffer)
|
||||||
data))
|
(or (get type 'error-message) "")))))
|
||||||
|
(cond
|
||||||
|
(straight-error-p
|
||||||
(print! (error "There was an unexpected package error"))
|
(print! (error "There was an unexpected package error"))
|
||||||
(when-let (output (straight--process-get-output))
|
(when-let (output (straight--process-get-output))
|
||||||
(print-group!
|
(print-group!
|
||||||
@ -285,9 +286,11 @@ BODY will be run when this dispatcher is called."
|
|||||||
(print-escape-control-characters t)
|
(print-escape-control-characters t)
|
||||||
(print-level nil)
|
(print-level nil)
|
||||||
(print-circle nil))
|
(print-circle nil))
|
||||||
|
(when straight-error-p
|
||||||
|
(print (string-trim (or (straight--process-get-output) ""))))
|
||||||
(mapc #'print (cons (list type data) backtrace)))
|
(mapc #'print (cons (list type data) backtrace)))
|
||||||
(print! (warn "Extended backtrace logged to %s")
|
(print! (warn "Extended backtrace logged to %s")
|
||||||
(relpath doom-cli-log-error-file)))))
|
(relpath doom-cli-log-error-file))))))
|
||||||
(throw 'exit 255))
|
(throw 'exit 255))
|
||||||
|
|
||||||
(defun doom-cli--backtrace ()
|
(defun doom-cli--backtrace ()
|
||||||
|
Reference in New Issue
Block a user