From 098f10306d35602bfee83657ea72042fe4931ce6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 27 Aug 2020 03:10:43 -0400 Subject: [PATCH] Fix CLI error not including straight output --- core/core-cli.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/core-cli.el b/core/core-cli.el index a417258d4..f137cf9d5 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -256,14 +256,15 @@ BODY will be run when this dispatcher is called." (print! (error "There was an unexpected error")) (print-group! (print! "%s %s" (bold "Message:") (get error 'error-message)) - (print! "%s %s" (bold "Data:") (cons error data)) + (print! "%s %S" (bold "Data:") (cons error data)) (when (and (bound-and-true-p straight-process-buffer) - (string-match-p (regexp-quote straight-process-buffer) - (get error 'error-message))) + (ignore-errors + (string-match-p "straight" (car data)))) (print! (bold "Straight output:")) (let ((output (straight--process-get-output))) (appendq! data (list (cons "STRAIGHT" output))) - (print-group! (print! "%s" output)))) + (print-group! + (print! "%s" (string-trim-right output))))) (when backtrace (print! (bold "Backtrace:")) (print-group!