Ensure straight is loaded on doom-initialize-packages

Without causing recursive require errors if called in an after! handler
for straight.
This commit is contained in:
Henrik Lissner 2019-08-15 19:56:20 -04:00
parent 8d3536fa77
commit b2fd76cb49
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 2 additions and 1 deletions

View file

@ -198,7 +198,6 @@ ones."
"Reload `doom-packages', `package' and `quelpa'." "Reload `doom-packages', `package' and `quelpa'."
(interactive) (interactive)
;; HACK straight.el must be loaded for this to work ;; HACK straight.el must be loaded for this to work
(require 'straight)
(message "Reloading packages") (message "Reloading packages")
(doom-initialize-packages t) (doom-initialize-packages t)
(message "Reloading packages...DONE")) (message "Reloading packages...DONE"))

View file

@ -138,6 +138,8 @@ necessary package metadata is initialized and available for them."
(when (or force-p (not doom-init-packages-p)) (when (or force-p (not doom-init-packages-p))
(doom-log "Initializing straight") (doom-log "Initializing straight")
(setq doom-init-packages-p t) (setq doom-init-packages-p t)
(unless (fboundp 'straight--reset-caches)
(require 'straight))
(straight--reset-caches) (straight--reset-caches)
(mapc #'straight-use-recipes doom-core-package-sources) (mapc #'straight-use-recipes doom-core-package-sources)
(straight-register-package (straight-register-package