Fix doom-initialize-packages messing up load-path

This fixes issues with the doctor not being able to find certain
packages (like evil-collection), and an issue where using the package
management API (which calls doom-initialize-packages) breaks the current
session by breaking the load-path.
This commit is contained in:
Henrik Lissner 2018-06-26 13:29:52 +02:00
parent e6a89e4bf9
commit 80ddf2122b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -97,8 +97,8 @@ them."
(unless (eq force-p 'internal)
;; `package-alist'
(when (or force-p (not (bound-and-true-p package-alist)))
(setq load-path (cons doom-core-dir doom-site-load-path))
(doom-ensure-packages-initialized 'force))
(doom-ensure-packages-initialized 'force)
(setq load-path (cl-remove-if-not #'file-directory-p load-path)))
;; `quelpa-cache'
(when (or force-p (not (bound-and-true-p quelpa-cache)))
;; ensure un-byte-compiled version of quelpa is loaded