fix(cli): doctor: wrong-type-argument stringp error
`doom doctor` throws a type error for enabled modules without a
doctor.el and/or packages.el file. This occurs because, in
in775ee2f04aad, `doom-module-expand-path` was changed to return nil if
the target file did not exist, and the doctor wasn't updated to handle
this. It passes `nil` to `load`, causing this type error.
Amend: 775ee2f04a
This commit is contained in:
parent
8f50ead5c8
commit
9e08097119
1 changed files with 17 additions and 15 deletions
|
@ -246,21 +246,23 @@ in."
|
|||
(doom-module-context-with (cons group name)
|
||||
(let ((doctor-file (doom-module-expand-path group name "doctor.el"))
|
||||
(packages-file (doom-module-expand-path group name doom-module-packages-file)))
|
||||
(cl-loop with doom-output-indent = 6
|
||||
for name in (doom-context-with 'packages
|
||||
(let* (doom-packages
|
||||
doom-disabled-packages)
|
||||
(load packages-file 'noerror 'nomessage)
|
||||
(mapcar #'car doom-packages)))
|
||||
unless (or (doom-package-get name :disable)
|
||||
(eval (doom-package-get name :ignore))
|
||||
(plist-member (doom-package-get name :recipe) :local-repo)
|
||||
(locate-library (symbol-name name))
|
||||
(doom-package-built-in-p name)
|
||||
(doom-package-installed-p name))
|
||||
do (print! (error "Missing emacs package: %S") name))
|
||||
(let ((inhibit-message t))
|
||||
(load doctor-file 'noerror 'nomessage))))
|
||||
(when packages-file
|
||||
(cl-loop with doom-output-indent = 6
|
||||
for name in (doom-context-with 'packages
|
||||
(let* (doom-packages
|
||||
doom-disabled-packages)
|
||||
(load packages-file 'noerror 'nomessage)
|
||||
(mapcar #'car doom-packages)))
|
||||
unless (or (doom-package-get name :disable)
|
||||
(eval (doom-package-get name :ignore))
|
||||
(plist-member (doom-package-get name :recipe) :local-repo)
|
||||
(locate-library (symbol-name name))
|
||||
(doom-package-built-in-p name)
|
||||
(doom-package-installed-p name))
|
||||
do (print! (error "Missing emacs package: %S") name)))
|
||||
(when doctor-file
|
||||
(let ((inhibit-message t))
|
||||
(load doctor-file 'noerror 'nomessage)))))
|
||||
(file-missing (error! "%s" (error-message-string ex)))
|
||||
(error (error! "Syntax error: %s" ex)))
|
||||
(when (or doom-doctor--errors doom-doctor--warnings)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue