Manually finalize straight transactions
Straight expects to be used interactively, which don't do (yet). Its transactional system depends on idle timers, which don't run in a noninteractive session, so we have to nudge it ourselves.
This commit is contained in:
parent
2aa7dbfb27
commit
bdcb156b91
2 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
(doom-reload-core-autoloads)
|
||||
(when (progn ,@body)
|
||||
(doom-reload-package-autoloads 'force-p))
|
||||
(doom--finalize-straight)
|
||||
t))
|
||||
|
||||
|
||||
|
|
|
@ -116,6 +116,10 @@ missing) and shouldn't be deleted.")
|
|||
(let ((user-emacs-directory doom-local-dir))
|
||||
(apply orig-fn args)))
|
||||
|
||||
(defun doom--finalize-straight ()
|
||||
(mapc #'funcall (delq nil (mapcar #'cdr straight--transaction-alist)))
|
||||
(setq straight--transaction-alist nil))
|
||||
|
||||
|
||||
;;
|
||||
;;; Bootstrapper
|
||||
|
@ -140,7 +144,7 @@ necessary package metadata is initialized and available for them."
|
|||
:branch ,straight-repository-branch))
|
||||
(mapc #'straight-use-package doom-core-packages)
|
||||
(when noninteractive
|
||||
(add-hook 'kill-emacs-hook #'straight--transaction-finalize))
|
||||
(add-hook 'kill-emacs-hook #'doom--finalize-straight))
|
||||
(dolist (package (straight--directory-files (straight--build-dir)))
|
||||
(add-to-list 'load-path (directory-file-name (straight--build-dir package)))))
|
||||
(when (or force-p (not doom-packages))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue