Skip to content

Commit

Permalink
chore: Report error if the tangling process fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Maverobot committed Feb 2, 2024
1 parent e261a78 commit 3c17ff3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -660,11 +660,13 @@ If you are unsure, try setting them in `dotspacemacs/user-config' first."
(uc (concat dotspacemacs-directory "user-config.el")))
(when (or (file-newer-than-file-p src ui)
(file-newer-than-file-p src uc))
(call-process
(concat invocation-directory invocation-name)
nil "*tangle-spacemacs-org-file-output*" t
"-q" "--batch" "--eval" "(require 'ob-tangle)"
"--eval" (format "(org-babel-tangle-file \"%s\")" src)))
(setq call-process-result (call-process
(concat invocation-directory invocation-name)
nil "*tangle-spacemacs-org-file-output*" t
"-q" "--batch" "--eval" "(require 'ob-tangle)"
"--eval" (format "(org-babel-tangle-file \"%s\")" src))))
(if (not (zerop call-process-result))
(error "Error during tangling of %s with exit code %d" src call-process-result))
(load-file ui)))

(defun dotspacemacs/user-config ()
Expand Down

0 comments on commit 3c17ff3

Please sign in to comment.