SLY/Nyxt: Report error when building Guix profile.

master
Pierre Neidhardt 2021-03-06 15:31:25 +01:00
parent 90d8953101
commit 5ea702d757
1 changed files with 6 additions and 1 deletions

View File

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