From 80ddf2122b4d6bb032d4044467f858018f768526 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 26 Jun 2018 13:29:52 +0200 Subject: [PATCH] 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. --- core/core-packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 762277b02..72d430971 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -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