diff --git a/core/autoload/packages.el b/core/autoload/packages.el index c9c814b4a..b2ef5f1d1 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -198,7 +198,6 @@ ones." "Reload `doom-packages', `package' and `quelpa'." (interactive) ;; HACK straight.el must be loaded for this to work - (require 'straight) (message "Reloading packages") (doom-initialize-packages t) (message "Reloading packages...DONE")) diff --git a/core/core-packages.el b/core/core-packages.el index f12426acc..e54ca1ccd 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -138,6 +138,8 @@ necessary package metadata is initialized and available for them." (when (or force-p (not doom-init-packages-p)) (doom-log "Initializing straight") (setq doom-init-packages-p t) + (unless (fboundp 'straight--reset-caches) + (require 'straight)) (straight--reset-caches) (mapc #'straight-use-recipes doom-core-package-sources) (straight-register-package