From db16e5c03e15ea753abc052199ca45bc552214c7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Nov 2020 14:08:29 -0500 Subject: [PATCH] Fix error if autoloads file is missing at startup Should warn the user to run 'doom sync' if the autoloads file is missing, but was giving a less helpful, generic error instead. --- core/core.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/core.el b/core/core.el index a61e194b1..d1b49d1f3 100644 --- a/core/core.el +++ b/core/core.el @@ -549,13 +549,13 @@ to least)." (file-missing ;; If the autoloads file fails to load then the user forgot to sync, or ;; aborted a doom command midway! - (if (equal (nth 3 e) doom-autoloads-file) - (signal 'doom-error - (list "Doom is in an incomplete state" - "run 'doom sync' on the command line to repair it")) - ;; Otherwise, something inside the autoloads file is triggering this - ;; error; forward it! - (signal 'doom-autoload-error e)))) + (if (locate-file doom-autoloads-file load-path) + ;; Something inside the autoloads file is triggering this error; + ;; forward it to the caller! + (signal 'doom-autoload-error e) + (signal 'doom-error + (list "Doom is in an incomplete state" + "run 'doom sync' on the command line to repair it"))))) ;; Load shell environment, optionally generated from 'doom env'. No need ;; to do so if we're in terminal Emacs, where Emacs correctly inherits