Forward file-missing errors from within autoloads
If a load call occurs within the autoloads file and throws a file-missing error, it would be misleading to say 'doom sync' will fix it, so forward the real error!
This commit is contained in:
parent
7638bd3968
commit
9f84bc334b
1 changed files with 7 additions and 3 deletions
10
core/core.el
10
core/core.el
|
@ -514,9 +514,13 @@ to least)."
|
||||||
(file-missing
|
(file-missing
|
||||||
;; If the autoloads file fails to load then the user forgot to sync, or
|
;; If the autoloads file fails to load then the user forgot to sync, or
|
||||||
;; aborted a doom command midway!
|
;; aborted a doom command midway!
|
||||||
(signal 'doom-error
|
(if (equal (nth 3 e) doom-autoload-file)
|
||||||
(list "Doom is in an incomplete state"
|
(signal 'doom-error
|
||||||
"run 'bin/doom sync' on the command line to repair it"))))
|
(list "Doom is in an incomplete state"
|
||||||
|
"run 'bin/doom sync' on the command line to repair it"))
|
||||||
|
;; Otherwise, something inside the autoloads file is triggering this
|
||||||
|
;; error; forward it!
|
||||||
|
(apply #'doom-autoload-error e))))
|
||||||
|
|
||||||
;; Load shell environment, optionally generated from 'doom env'. No need
|
;; Load shell environment, optionally generated from 'doom env'. No need
|
||||||
;; to do so if we're in terminal Emacs, where Emacs correctly inherits
|
;; to do so if we're in terminal Emacs, where Emacs correctly inherits
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue