From 5ea702d7577d0d10dfff2b83026bb5161bf49fb5 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Sat, 6 Mar 2021 15:31:25 +0100 Subject: [PATCH] SLY/Nyxt: Report error when building Guix profile. --- .emacs.d/lisp/init-sly.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.emacs.d/lisp/init-sly.el b/.emacs.d/lisp/init-sly.el index 043f6a12..77a994a7 100644 --- a/.emacs.d/lisp/init-sly.el +++ b/.emacs.d/lisp/init-sly.el @@ -65,7 +65,12 @@ GUIX-COMMAND is the command to the guix executable, e.g. '(\"~/projects/guix/pre (when no-grafts? (list "--no-grafts"))))) (message "Running %S" (mapconcat #'identity (cons command args) " ")) - (apply #'call-process command nil nil nil args)) + (let* ((output (get-buffer-create " *Guix SBCL for Nyxt*")) + (status (apply #'call-process command nil `(,output t) nil args))) + (if (= status 0) + (kill-buffer output) + (switch-to-buffer-other-window output) + (error "Guix command failed, see %s" output)))) ;; Update root mtime in case it's not changed. ;; Can't use `set-file-times' on links. (call-process "touch" nil nil nil "-h" root))