docs: revise and fix nerd-icons doctor check

Also fixes an issue where errors weren't counted, so the explanation
would never appear.

Fix: #7431
This commit is contained in:
Henrik Lissner 2023-09-16 15:32:54 +02:00 committed by Yann Esposito (Yogsototh)
parent 4d565377f6
commit 272a8c23a9
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -260,12 +260,13 @@ in."
(dolist (font nerd-icons-font-names) (dolist (font nerd-icons-font-names)
(if (save-excursion (re-search-backward font nil t)) (if (save-excursion (re-search-backward font nil t))
(success! "Found font %s" font) (success! "Found font %s" font)
(print! (warn "Warning: couldn't find %S font") font))) (print! (warn "%S font is not installed on your system") font)
(cl-incf errors)))
(when (> errors 0) (when (> errors 0)
(explain! "Some nerd-icons fonts were missing.\n\n" (explain! "Some needed fonts are not properly installed on your system. To download and "
"You can install them by running `M-x nerd-icons-install-fonts' within Emacs.\n" "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. "
"This could also mean you've installed them in non-standard locations, in which " "However, on Windows this command will only download them; the fonts must "
"case feel free to ignore this warning."))))))))) "be installed manually afterwards.")))))))))
(print! (start "Checking for stale elc files in your DOOMDIR...")) (print! (start "Checking for stale elc files in your DOOMDIR..."))
(when (file-directory-p doom-user-dir) (when (file-directory-p doom-user-dir)