Henrik Lissner 2021-04-29 15:07:13 -04:00
parent 259cf83ef1
commit f60f576048
4 changed files with 84 additions and 53 deletions

View file

@ -10,10 +10,18 @@
(stringp data)
(string-match-p (regexp-quote straight-process-buffer)
data)
(straight--process-get-output))))
(with-current-buffer (straight--process-buffer)
(split-string (buffer-string) "\n" t)))))
(cond (straight-error
(print! (error "The package manager threw an error"))
(print-group! (print! "%s" (string-trim straight-error))))
(print! (error "Last 25 lines of straight's error log:"))
(print-group!
(print!
"%s" (string-join
(seq-subseq straight-error
(max 0 (- (length straight-error) 25))
(length straight-error))
"\n"))))
((print! (error "There was an unexpected error"))
(print-group!
(print! "%s %s" (bold "Message:") (get type 'error-message))
@ -37,7 +45,7 @@
(print-level nil)
(print-circle nil))
(when straight-error
(print (string-trim straight-error)))
(print (string-join straight-error "\n")))
(mapc #'print (cons (list type data) backtrace)))
(print! (warn "Extended backtrace logged to %s")
(relpath doom-cli-log-error-file)))))))